Publishing to crates.io #
The tang binary is published as the tangled-cli package. It depends on the
public tangled-api and tangled-config workspace crates. xtask is not
published.
Prerequisites #
- Rust 1.88 or newer
- A crates.io account with ownership of
tangled-api,tangled-config, andtangled-cli - A crates.io API token configured with
cargo login - A clean working copy with the
mainbookmark at the release commit
All three published packages share one workspace version. Update
workspace.package.version in Cargo.toml, the internal dependency
requirements, and CHANGELOG.md for a release.
Preflight #
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
cargo xtask codegen --check
cargo publish --workspace --dry-run
cargo package -p tangled-cli --list
cargo publish --workspace packages and verifies the publishable workspace
crates in dependency order using a temporary local registry. This lets the
first release dry run before the internal dependencies exist on crates.io.
Review each package archive before publishing. In particular, verify that the README and both license files are present and that no credentials or local configuration files are included.
Publish #
Publish all publishable workspace crates in dependency order:
cargo publish --workspace
After publishing, verify installation from the registry in a clean temporary directory:
cargo install tangled-cli --version 0.1.0
tang --version
Finally, tag the exact release commit (for example, v0.1.0) and push the tag
and main bookmark.