bellbook 0.2.0

Tamper-evident, replay-verifiable records of captured agent activity: content-addressed typed records, deterministic verdicts, offline receipt validation.
Documentation
name: Release

on:
  release:
    types: [published]

permissions:
  contents: read

jobs:
  publish:
    name: Publish to crates.io
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
      - uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772
        with:
          toolchain: stable
      - name: Verify tag matches crate version
        run: |
          TAG="${GITHUB_REF_NAME#v}"
          CRATE="$(grep -m1 '^version = ' Cargo.toml | sed -E 's/version = "(.*)"/\1/')"
          echo "release tag: $TAG   crate version: $CRATE"
          if [ "$TAG" != "$CRATE" ]; then
            echo "::error::Release tag ($TAG) does not match Cargo.toml version ($CRATE)"
            exit 1
          fi
      - name: Verify package contents
        run: cargo package --locked
      - name: Publish
        run: cargo publish --locked
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}