Release Process
This document describes how to publish new versions of the Scarab Navigation Protocol crates to crates.io.
Prerequisites
- You must have publish permissions for both crates on crates.io
- You need a crates.io API token stored as
CARGO_REGISTRY_TOKENin GitHub Secrets - All tests must pass on the main branch
- The working directory should be clean (no uncommitted changes)
Publishing Strategy
This repository contains two crates:
scarab-nav-protocol: The core protocol definitionsscarab-nav-client: The client library (depends on protocol)
You can publish them independently or together.
Option 1: Publishing Both Crates (Recommended for initial release)
When publishing both crates with the same version:
-
Update version in both Cargo.toml files:
# Edit crates/scarab-nav-protocol/Cargo.toml # Edit crates/scarab-nav-client/Cargo.toml # Update version in scarab-nav-client's dependency on scarab-nav-protocol -
Commit the version changes:
git add . git commit -m "chore: bump version to 0.2.0" git push origin main -
Create and push a version tag:
git tag v0.2.0 git push origin v0.2.0 -
The GitHub Actions workflow will:
- Run all tests
- Publish
scarab-nav-protocolfirst - Wait 30 seconds for it to be available
- Publish
scarab-nav-client - Create a GitHub Release
Option 2: Publishing Protocol Only
If you only need to update the protocol:
-
Update version in
crates/scarab-nav-protocol/Cargo.toml -
Commit and push:
git add crates/scarab-nav-protocol/Cargo.toml git commit -m "chore(protocol): bump version to 0.2.0" git push origin main -
Create and push a protocol-specific tag:
git tag scarab-nav-protocol-v0.2.0 git push origin scarab-nav-protocol-v0.2.0
Option 3: Publishing Client Only
If you only need to update the client:
-
Update version in
crates/scarab-nav-client/Cargo.toml -
If the client needs a newer protocol version, update the dependency version too
-
Commit and push:
git add crates/scarab-nav-client/Cargo.toml git commit -m "chore(client): bump version to 0.2.0" git push origin main -
Create and push a client-specific tag:
git tag scarab-nav-client-v0.2.0 git push origin scarab-nav-client-v0.2.0
Tag Format
The release workflow recognizes these tag formats:
v*.*.*- Publishes both crates (e.g.,v0.2.0)scarab-nav-protocol-v*.*.*- Publishes protocol only (e.g.,scarab-nav-protocol-v0.2.0)scarab-nav-client-v*.*.*- Publishes client only (e.g.,scarab-nav-client-v0.2.0)
Pre-release Versions
For alpha, beta, or release candidate versions:
-
Use semantic versioning with pre-release identifiers:
v0.2.0-alpha.1v0.2.0-beta.1v0.2.0-rc.1
-
The GitHub Release will be marked as a pre-release automatically
Manual Publishing (Fallback)
If you need to publish manually:
# Publish protocol first
cd crates/scarab-nav-protocol
cargo publish
# Wait for it to be available on crates.io (usually 1-2 minutes)
# Then publish client
cd ../scarab-nav-client
cargo publishTroubleshooting
”Version already exists” error
If a version was already published, you must bump the version number. You cannot republish the same version.
Client fails to find protocol version
If publishing both crates and the client fails because it can’t find the protocol version:
- The protocol might not be available yet on crates.io
- Wait a few minutes and retry
- Or publish them separately with a delay
Verification failed
If the workflow fails verification:
- Ensure the tag version matches the Cargo.toml version exactly
- Check that all tests pass locally:
cargo test --all-features --workspace - Check formatting:
cargo fmt --all -- --check - Check clippy:
cargo clippy --all-features --workspace -- -D warnings
Post-Release Checklist
After a successful release:
- Verify the crates appear on crates.io
- Check that docs.rs built documentation successfully
- Update any dependent projects
- Announce the release if it’s a major version
Yanking a Release
If you need to yank a broken release:
cargo yank --vers 0.2.0 scarab-nav-protocol
cargo yank --vers 0.2.0 scarab-nav-clientThis removes it from being downloaded by new projects but doesn’t break existing users.