Skip to content

Commit 61b0de9

Browse files
authored
Add Workflow to upload artifact to Release (#80)
Add a new GitHub Actions Workflow to build the release binary and upload the resultant artifact to a Release.
2 parents 88932ca + 883055a commit 61b0de9

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/release.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
build:
8+
name: Build and Upload
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Clone project
12+
uses: actions/checkout@v3
13+
14+
- name: Validate toolchain
15+
run: |
16+
echo "RUST_VERSION=$(rustc --version | cut -d ' ' -f 2)" >> ${GITHUB_ENV}
17+
18+
- uses: actions/cache@v4
19+
with:
20+
path: |
21+
~/.cargo/bin/
22+
~/.cargo/registry/index/
23+
~/.cargo/registry/cache/
24+
~/.cargo/git/db/
25+
target/release
26+
key: cargo-${{ runner.os }}-${{ runner.arch}}-${{ env.RUST_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
27+
restore-keys: |
28+
cargo-${{ runner.os }}-${{ runner.arch}}-${{ env.RUST_VERSION }}-
29+
30+
- name: Build binary
31+
run: |
32+
cargo build --release
33+
34+
- name: Upload binary to Release
35+
uses: softprops/action-gh-release@v2
36+
with:
37+
tag_name: ${{ github.ref_name }}
38+
files: target/release/technique

0 commit comments

Comments
 (0)