From 883055a43e44f5cb7884aed12eacf29909f563cd Mon Sep 17 00:00:00 2001 From: Andrew Cowie Date: Wed, 17 Sep 2025 17:17:10 +1000 Subject: [PATCH] New workflow for uploading artifacts to Release --- .github/workflows/release.yaml | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..6fef8cf --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,38 @@ +name: Release +on: + release: + types: [published] + +jobs: + build: + name: Build and Upload + runs-on: ubuntu-latest + steps: + - name: Clone project + uses: actions/checkout@v3 + + - name: Validate toolchain + run: | + echo "RUST_VERSION=$(rustc --version | cut -d ' ' -f 2)" >> ${GITHUB_ENV} + + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/release + key: cargo-${{ runner.os }}-${{ runner.arch}}-${{ env.RUST_VERSION }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-${{ runner.os }}-${{ runner.arch}}-${{ env.RUST_VERSION }}- + + - name: Build binary + run: | + cargo build --release + + - name: Upload binary to Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.ref_name }} + files: target/release/technique \ No newline at end of file