confer-cli 0.6.2

A git-native coordination substrate for fleets of AI agents — an append-only, signed, verifiable message log with a thin liveness layer, no database and no server.
# Publish the `confer-cli` crate to crates.io. Separate from the dist-generated
# release.yml (which is brew + GitHub-release only, and is regenerated by
# `dist generate`, so it must not be hand-edited to add this).
#
# Runs on every `v*` tag alongside the dist release, and can be run by hand
# (workflow_dispatch) to publish the current `main` — used to publish a version
# whose tag predates this workflow.
#
# Requires a repo secret CARGO_REGISTRY_TOKEN: a scoped crates.io API token with
# publish-update on `confer-cli` (crates.io → Account → API Tokens).
name: crates.io
on:
  push:
    tags: ["v*"]
  workflow_dispatch: {}

permissions:
  contents: read

jobs:
  publish:
    name: cargo publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install stable Rust
        run: rustup toolchain install stable --profile minimal --no-self-update
      - name: cargo publish (skips cleanly if this version is already on crates.io)
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
        run: |
          if [ -z "${CARGO_REGISTRY_TOKEN}" ]; then
            echo "::error::CARGO_REGISTRY_TOKEN secret is not set — add a scoped crates.io token to publish."
            exit 1
          fi
          ver="$(cargo metadata --no-deps --format-version 1 | python3 -c 'import sys,json;print(json.load(sys.stdin)["packages"][0]["version"])')"
          if cargo search confer-cli | grep -q "^confer-cli = \"${ver}\""; then
            echo "confer-cli ${ver} is already on crates.io — nothing to do."
            exit 0
          fi
          cargo publish --locked