This project uses cargo-smart-release and the github cli to perform releases.
cargo install cargo-smart-release
Visit https://cli.github.com/ and follow the instructions for your platform
You need to be logged in to crates with a user with publishing rights.
cargo login
You need to be logged in with a user allowed to make tags and releases.
We do this before the release, so the README on crates points to the dependencies for the actual released version.
sed -i s/<current_version>/<next_version>/g README.md
sed -i s/<current_version>/<next_version>/g server/README.md
To update CLI.md we've built in a task to the edge binary which prints the Clap help file to markdown format. Run
cargo run -- edge -u http://localhost:4242 --markdown-help > CLI.md
git commit -m"chore: Prepare for release"
cargo smart-release -b <patch|minor|major> -u
If the computed version isn't correct, you can run with the --no-bump-on-demand
flag to make it work.
For instance, in this case, smart-release thought the next version should be 13.0.2 instead of 18.0.1:
[INFO ] Manifest version of provided package 'unleash-edge' at 18.0.0 is sufficient to succeed latest released version 13.0.2, ignoring computed version 18.0.1
Running it with --no-bump-on-demand
gives this output instead:
[INFO ] WOULD patch-bump provided package 'unleash-edge' from 18.0.0 to 18.0.1 for publishing, 13.0.2 on crates.io
The doc string for --no-bump-on-demand
is:
--no-bump-on-demand Always bump versions as specified by --bump or --bump-dependencies even if this is not required to publish a new version to crates.io
It appears that crates.io has changed it's index format and that smart-release hasn't quite been brought up to speed.
cargo smart-release -b <patch|minor|major> -u --execute
Remember to add the --no-bump-on-demand
flag here too if it was needed to get the right version in the previous step.
This will display the changelog in your $EDITOR, once satisfied with changelog, quit out of the changelog preview, and the rest (building, publishing to cargo, tagging and making release notes) will be handled by smart-release