Summary
Add the `publish` CI job that automatically publishes all six Traverse crates to crates.io in dependency order when a `v*` tag is pushed.
Governing Spec
- `048-semver-publishing-pipeline`
Blocked by
Publish order (dependency graph)
traverse-contracts
└── traverse-registry
├── traverse-runtime
│ ├── traverse-mcp
│ └── traverse-cli
└── traverse-expedition-wasm
Each crate is published only after its dependencies are confirmed published. A 30-second sleep between publishes handles crates.io index propagation lag.
CI job spec
publish:
name: Publish to crates.io
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: [ci] # all existing checks must pass first
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Publish crates in dependency order
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: bash scripts/ci/publish_crates.sh
`scripts/ci/publish_crates.sh`
- Publishes each crate with `cargo publish -p `
- If `cargo publish` exits with "already uploaded" (crates.io error code for duplicate version), treats it as success (idempotent)
- If any crate fails for any other reason, exits non-zero immediately
- Prints which crate is being published and its version before each step
Definition of Done
Summary
Add the `publish` CI job that automatically publishes all six Traverse crates to crates.io in dependency order when a `v*` tag is pushed.
Governing Spec
Blocked by
Publish order (dependency graph)
Each crate is published only after its dependencies are confirmed published. A 30-second sleep between publishes handles crates.io index propagation lag.
CI job spec
`scripts/ci/publish_crates.sh`
Definition of Done