From e2775b83146e8976785e0d9931afe06200e65134 Mon Sep 17 00:00:00 2001 From: m1ngsama Date: Thu, 18 Dec 2025 13:24:59 +0800 Subject: [PATCH] ci: add Rust release workflow Added workflow to build and release binaries for Linux, macOS, and Windows on tag push. --- .github/workflows/release.yml | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0831a99 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: Release + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + release: + name: Build and Release for ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-latest + artifact_name: tracker-rs + asset_name: tracker-rs-linux-amd64 + - os: windows-latest + artifact_name: tracker-rs.exe + asset_name: tracker-rs-windows-amd64.exe + - os: macos-latest + artifact_name: tracker-rs + asset_name: tracker-rs-macos-amd64 + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Build + run: cargo build --release + + - name: Rename binary + shell: bash + run: | + cp target/release/${{ matrix.artifact_name }} ${{ matrix.asset_name }} + + - name: Upload to Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: ${{ matrix.asset_name }} + generate_release_notes: true