name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- target: x86_64-apple-darwin
os: macos-latest
name: ffmpuzzle-macos-x86_64
- target: aarch64-apple-darwin
os: macos-latest
name: ffmpuzzle-macos-aarch64
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
name: ffmpuzzle-linux-x86_64
- target: x86_64-pc-windows-msvc
os: windows-latest
name: ffmpuzzle-windows-x86_64.exe
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- run: cargo build --release --target ${{ matrix.target }}
- name: Rename binary
shell: bash
run: |
if [ "${{ matrix.os }}" = "windows-latest" ]; then
cp target/${{ matrix.target }}/release/ffmpuzzle.exe ${{ matrix.name }}
else
cp target/${{ matrix.target }}/release/ffmpuzzle ${{ matrix.name }}
fi
- uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.name }}