git-agent-verdict 0.1.0

Verify that a commit message carries an attested review verdict
name: release

on:
  push:
    tags:
      - "v[0-9]+.[0-9]+.[0-9]+*"

env:
  CARGO_TERM_COLOR: always

jobs:
  create-release:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v4
      - uses: taiki-e/create-gh-release-action@v1
        with:
          changelog: CHANGELOG.md
          token: ${{ secrets.GITHUB_TOKEN }}

  upload-assets:
    needs: create-release
    permissions:
      contents: write
    strategy:
      fail-fast: false
      matrix:
        include:
          - target: x86_64-unknown-linux-gnu
            os: ubuntu-latest
          - target: x86_64-unknown-linux-musl
            os: ubuntu-latest
            build_tool: cargo-zigbuild
          - target: aarch64-unknown-linux-gnu
            os: ubuntu-latest
            build_tool: cargo-zigbuild
          - target: aarch64-unknown-linux-musl
            os: ubuntu-latest
            build_tool: cargo-zigbuild
          - target: x86_64-apple-darwin
            os: macos-latest
          - target: aarch64-apple-darwin
            os: macos-latest
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      # Produces cargo-binstall-compatible archives (name-target.tar.gz + .sha256)
      # and uploads them to the release for this tag.
      - uses: taiki-e/upload-rust-binary-action@v1
        with:
          bin: git-agent-verdict
          target: ${{ matrix.target }}
          build-tool: ${{ matrix.build_tool || 'cargo' }}
          archive: $bin-$target
          checksum: sha256
          token: ${{ secrets.GITHUB_TOKEN }}

  publish-crate:
    needs: create-release
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}