Skip to content

Commit c6abe93

Browse files
committed
chore: update ci
1 parent f318013 commit c6abe93

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/build.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- main
77
- dev
88

9+
env:
10+
ARTIFACT_NAME: rtss-${{ github.ref_name }}.tar.gz
11+
912
jobs:
1013
build:
1114
runs-on: ubuntu-latest
@@ -17,9 +20,19 @@ jobs:
1720
with:
1821
targets: x86_64-unknown-linux-gnu
1922

20-
- run: cargo build --release --target x86_64-unknown-linux-gnu
23+
- run: cargo build --release --target x86_64-unknown-linux-gnu && cp target/x86_64-unknown-linux-gnu/release/rtss-v2 rtss
2124

2225
- uses: actions/upload-artifact@v3
2326
with:
24-
name: rtss-v2
25-
path: target/x86_64-unknown-linux-gnu/release/rtss-v2
27+
name: rtss
28+
path: rtss
29+
30+
- name: Prepare tarball for release
31+
if: startsWith(github.ref, 'refs/tags/')
32+
run: tar zcvf $ARTIFACT_NAME rtss
33+
34+
- name: Release
35+
uses: softprops/action-gh-release@v1
36+
if: startsWith(github.ref, 'refs/tags/')
37+
with:
38+
files: ${{ env.ARTIFACT_NAME }}

0 commit comments

Comments
 (0)