git-attest 1.7.0

Sign and verify attestations that a test suite already passed on a tree, so CI can skip it: the library and its command line
Documentation
# The release archives, one per target. Called by prepare-release, never on
# its own: an archive is only worth the digest a release PR commits for it.
#
# This target list is the one RELEASE pins and fetch.sh maps runners onto;
# tests/fetch.sh fails when they differ.
name: build

on:
  workflow_call:
    inputs:
      version:
        required: true
        type: string

permissions:
  contents: read

defaults:
  run:
    shell: bash

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        include:
          - { target: aarch64-apple-darwin,       os: macos-latest }
          - { target: x86_64-apple-darwin,        os: macos-latest }
          - { target: x86_64-unknown-linux-gnu,   os: ubuntu-latest }
          - { target: aarch64-unknown-linux-gnu,  os: ubuntu-latest }
          - { target: x86_64-unknown-linux-musl,  os: ubuntu-latest }
          - { target: x86_64-pc-windows-msvc,     os: windows-latest }
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
      - run: rustup target add ${{ matrix.target }}
      - name: cross toolchain
        if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'x86_64-unknown-linux-musl' }}
        run: |
          set -eu
          sudo apt-get update
          if [ "${{ matrix.target }}" = aarch64-unknown-linux-gnu ]; then
            sudo apt-get install -y gcc-aarch64-linux-gnu
            echo 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc' >> "$GITHUB_ENV"
          else
            sudo apt-get install -y musl-tools
          fi
      - run: cargo build --release --locked --target ${{ matrix.target }}
      - name: archive
        run: |
          set -eu
          name=git-attest-${{ inputs.version }}-${{ matrix.target }}
          mkdir -p "dist/$name"
          if [ "${{ matrix.os }}" = windows-latest ]; then
            cp "target/${{ matrix.target }}/release/git-attest.exe" "dist/$name/"
          else
            cp "target/${{ matrix.target }}/release/git-attest" "dist/$name/"
          fi
          cp README.md LICENSE SPEC.md "dist/$name/"
          tar czf "dist/$name.tar.gz" -C dist "$name"
      - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
        with:
          name: ${{ matrix.target }}
          path: dist/*.tar.gz