txcript 0.8.0

Convert coding-agent session transcripts between harness formats.
Documentation
name: publish-crates

# Publishes the Rust crate to crates.io on a version tag, e.g.
# `git tag v0.2.0 && git push origin v0.2.0`.
# Guards that the tag matches the manifest version before publishing.
on:
  push:
    tags:
      - "v*"

permissions:
  contents: read

jobs:
  crates-io:
    name: Publish to crates.io
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - name: Tag matches Cargo.toml version
        run: |
          tag="${GITHUB_REF_NAME#v}"
          ver="$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "txcript") | .version')"
          echo "tag=$tag manifest=$ver"
          [ "$tag" = "$ver" ] || { echo "::error::tag $tag != Cargo.toml version $ver"; exit 1; }
      # Only the library goes to crates.io; the cli crate is publish = false.
      - run: cargo publish --locked -p txcript
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}