Files
libfreemkv/.github/workflows/release.yml
T
MattJackson 55bc96eeee Add release workflow + prebuilt binary downloads in README
- GitHub Actions: build Linux x86_64 + aarch64 on tag push
- Upload tar.gz binaries to GitHub Releases
- README: download table linking to releases
2026-04-06 11:44:46 -07:00

50 lines
1.2 KiB
YAML

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross-compilation tools
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
echo 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc' >> $GITHUB_ENV
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Package
run: |
cd target/${{ matrix.target }}/release
for bin in freemkv-info freemkv-test; do
if [ -f "$bin" ]; then
tar czf "../../../${bin}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz" "$bin"
fi
done
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: '*.tar.gz'