cargo-tribute 0.7.0

Generate a REUSE-style LICENSES/ folder and third-party attribution from a Cargo dependency tree.
name: release

# build a binary per target and attach it to the release for the pushed tag
on:
  push:
    tags:
      - "v[0-9]+.[0-9]+.[0-9]+"

permissions:
  contents: write

jobs:
  binaries:
    name: ${{ matrix.target }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - { target: x86_64-unknown-linux-musl, os: ubuntu-latest }
          - { target: i686-unknown-linux-musl, os: ubuntu-latest }
          - { target: aarch64-unknown-linux-musl, os: ubuntu-latest }
          - { target: arm-unknown-linux-musleabihf, os: ubuntu-latest }
          - { target: aarch64-apple-darwin, os: macos-latest }
          - { target: x86_64-pc-windows-msvc, os: windows-latest }
          - { target: i686-pc-windows-msvc, os: windows-latest }
    steps:
      - uses: actions/checkout@v4
      # installs the target, cross-compiles with cross when needed, strips,
      # tars as {bin}-{target}.tar.gz, and uploads to the tag's release.
      # tar: all / zip: none forces tar.gz on windows too, so every asset matches
      # the binstall pkg-fmt = "tgz" in Cargo.toml.
      - uses: taiki-e/upload-rust-binary-action@v1
        with:
          bin: cargo-tribute
          target: ${{ matrix.target }}
          # prebuilt binaries ship with --audit; source `cargo install` is lean by default.
          features: audit
          archive: $bin-$target
          tar: all
          zip: none
          token: ${{ secrets.GITHUB_TOKEN }}