Skip to content

Commit

Permalink
feat(ci): Upload release
Browse files Browse the repository at this point in the history
  • Loading branch information
ImSoZRious committed Oct 29, 2023
1 parent d1d2b1b commit b492c91
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- main
- dev

env:
ARTIFACT_NAME: rusty-grader-${{ github.ref_name }}

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -17,9 +20,19 @@ jobs:
with:
targets: x86_64-unknown-linux-gnu

- run: cargo build --release --target x86_64-unknown-linux-gnu
- run: cargo build --release --target x86_64-unknown-linux-gnu && cp target/x86_64-unknown-linux-gnu/release/interface rusty-grader

- uses: actions/upload-artifact@v3
with:
name: rusty-grader
path: target/x86_64-unknown-linux-gnu/release/interface
path: rusty-grader

- name: Prepare tarball for release
if: startsWith(github.ref, 'resf/tag/')
run: tar zcvf $ARTIFACT_NAME rusty-grader

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ env.ARTIFACT_NAME }}

0 comments on commit b492c91

Please sign in to comment.