skeg-cli 0.1.0

Command-line tool for skeg (index build, inspect, repair)
Documentation
name: Release
on:
  push:
    tags: ['v*']

# Required by softprops/action-gh-release to create the GitHub Release.
permissions:
  contents: write

jobs:
  publish-crate:
    uses: skegdb/.github/.github/workflows/release-cargo.yml@main
    secrets:
      CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

  build-binaries:
    strategy:
      fail-fast: false
      matrix:
        # aarch64 only. skeg-cli links skeg-vector which carries the
        # NEON SIMD kernels; x86_64 would compile via scalar fallback.
        include:
          - target: aarch64-apple-darwin
            runner: macos-latest
          - target: aarch64-unknown-linux-gnu
            runner: ubuntu-latest
    runs-on: ${{ matrix.runner }}
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}
      - uses: Swatinem/rust-cache@v2
      - run: |
          if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then
            sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
            export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
          fi
          cargo build --release --target ${{ matrix.target }} --bin skeg-cli --locked
      - run: |
          cd target/${{ matrix.target }}/release
          NAME="skeg-cli-${{ github.ref_name }}-${{ matrix.target }}"
          tar -czf "${NAME}.tar.gz" skeg-cli
          shasum -a 256 "${NAME}.tar.gz" > "${NAME}.tar.gz.sha256"
      - uses: softprops/action-gh-release@v2
        with:
          files: |
            target/${{ matrix.target }}/release/skeg-cli-*.tar.gz
            target/${{ matrix.target }}/release/skeg-cli-*.tar.gz.sha256

  # bump-homebrew is intentionally disabled for v0.1.0. The
  # Formula/skeg-cli.rb stub was removed from skegdb/homebrew-tap
  # (placeholder sha256 was blocking brew audit); the formula will be
  # hand-crafted from the first GitHub Release and re-enabled with the
  # mislav action in a follow-up.