name: Upload release binaries
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Tag to build & upload binaries for (e.g. v0.1.1)"
required: true
type: string
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
jobs:
upload-assets:
name: Upload ${{ matrix.target }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: universal-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref }}
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: rust-rapport
target: ${{ matrix.target }}
archive: $bin-$target
tar: unix
zip: windows
ref: ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}