-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (31 loc) · 913 Bytes
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: build
on:
push:
branches:
- main
- dev
tags:
- "v*"
env:
ARTIFACT_NAME: rusty-grader-${{ github.ref_name }}.tar.gz
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
targets: 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: rusty-grader
- name: Prepare tarball for release
if: startsWith(github.ref, 'refs/tags/')
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 }}