Skip to content

Commit

Permalink
chore: add automated release binary publishing (#219)
Browse files Browse the repository at this point in the history
* chore: add automated release binary publishing

Signed-off-by: Eliza Weisman <[email protected]>
  • Loading branch information
hawkw authored Dec 17, 2021
1 parent e04a016 commit 83f4b62
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
push:
tags:
- console-subscriber-v[0-9]+.*
- console-api-v[0-9]+.*
- tokio-console-v[0-9]+.*

jobs:
create-release:
# only publish from the origin repository
if: github.repository_owner == 'tokio-rs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: extract tag
id: tag
run:
echo ::set-output name=TAG::$(echo $GITHUB_REF | sed -r
's/.*(console-subscriber|console-api|tokio-console).*/\1/'))
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: ${{ steps.tag.outputs.TAG }}/CHANGELOG.md
branch: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

upload-bins:
# only publish from the origin repository
if: github.repository_owner == 'tokio-rs'
# only upload binaries if the tag is a `tokio-console` release
if: contains(github.ref, 'tokio-console')
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: tokio-console
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 83f4b62

Please sign in to comment.