Skip to content

Commit b492c91

Browse files
committed
feat(ci): Upload release
1 parent d1d2b1b commit b492c91

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/build.yaml

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

9+
env:
10+
ARTIFACT_NAME: rusty-grader-${{ github.ref_name }}
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/interface rusty-grader
2124

2225
- uses: actions/upload-artifact@v3
2326
with:
2427
name: rusty-grader
25-
path: target/x86_64-unknown-linux-gnu/release/interface
28+
path: rusty-grader
29+
30+
- name: Prepare tarball for release
31+
if: startsWith(github.ref, 'resf/tag/')
32+
run: tar zcvf $ARTIFACT_NAME rusty-grader
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)