mirror of
https://github.com/m1ngsama/tracker.git
synced 2025-12-24 10:51:43 +00:00
ci: add Rust release workflow
Added workflow to build and release binaries for Linux, macOS, and Windows on tag push.
This commit is contained in:
parent
22cbc1d019
commit
e2775b8314
1 changed files with 47 additions and 0 deletions
47
.github/workflows/release.yml
vendored
Normal file
47
.github/workflows/release.yml
vendored
Normal file
|
|
@ -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
|
||||
Loading…
Reference in a new issue