Skip to content

Commit a4ef111

Browse files
authored
chore(CI): automatically publish releases on tags (#239)
Signed-off-by: Eliza Weisman <[email protected]>
1 parent 1845c99 commit a4ef111

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/release.yaml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,34 @@
11
name: Upload Binaries
22

33
on:
4-
release:
4+
push:
5+
tags:
6+
- console-subscriber-v[0-9]+.*
7+
- console-api-v[0-9]+.*
8+
- tokio-console-v[0-9]+.*
59

610
jobs:
11+
create-release:
12+
name: Create GitHub release
13+
# only publish from the origin repository
14+
if: github.repository_owner == 'tokio-rs'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: taiki-e/[email protected]
19+
with:
20+
prefix: "(console-subscriber)|(console-api)|(tokio-console)"
21+
changelog: "$prefix/CHANGELOG.md"
22+
title: "$prefix $version"
23+
branch: main
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
727
upload-bins:
28+
name: "Upload release binaries"
829
# only upload binaries if the tag is a`tokio-console` release
930
if: contains(github.ref, 'tokio-console')
31+
needs: create-release
1032
strategy:
1133
matrix:
1234
os: [ubuntu-latest, macos-latest, windows-latest]

0 commit comments

Comments
 (0)