cargo smart-release

Fearlessly release workspace crates without dealing with dependencies or versions.

Installation

Cargo

Via cargo, which can be obtained using rustup

cargo install cargo-smart-release

Preferred workflow

When developing various crates in a workspace I tend to edit code, and depending on the kind of edit, either increase the patch level, minor version or major version right after, depending on the basic rules of semver. Use cargo smart-release --bump minor --skip-tag --skip-publish --execute for this which has the benefit of it automatically adjusting other workspace dependencies when needed.

When ready for relasing a particular crate or set of crates of interest, run cargo smart-release [<crate-name> ...] to simulate a release. For particularly thorough but error-prone simulations (as in false positives) one could run cargo smart-release --dry-run-cargo-publish. After evaluating the release procedure and following instructions, one should end up with a fully automatic release of multiple crates. There are various other options that shouldn't be needed in the common case, use cargo smart-release --help to see them.

Features

Comparison to cargo release

cargo-release is the reason this tool exists, as it got me addicted to an all automatic release workflow that knows git. This works perfectly for simple workspaces or single-crate workspaces, as of 2021-08-12, so use it: cargo install cargo-release.

Here is what cargo smart-release does differently: "It tries really hard to do what I want most of the time when publishing workspace gitoxide crates".

Limitations

Acknowledgements

Thanks to [cargo-release] for showing the way and for incredible fast response times. I'd recommend everyone to participate there instead of writing your own.