How to Use cargo-release for Publishing Workflows

Automate versioning, tagging, and publishing Rust crates to Crates.io using the cargo-release command.

Use cargo release to bump version numbers, create git tags, and publish crates to Crates.io in a single workflow. Run the following command in your crate root to perform a dry run first, then execute the actual release:

cargo release --dry-run
cargo release

This command automatically handles version bumps in Cargo.toml, commits changes, tags the release, and pushes to the remote repository before publishing.