mirror of
https://github.com/m1ngsama/tracker.git
synced 2025-12-24 10:51:43 +00:00
Added workflow to build and release binaries for Linux, macOS, and Windows on tag push.
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
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
|