This is the release process which must be carried out by a maintainer with proper GitHub and crates.io credentials. Without both, this will fail.
- Install the Cargo release plugin (if it is not already installed):
cargo install cargo-release
- Go to the 'dev' branch and get the latest changes:
git switch dev
and thengit pull
. - On the 'dev' branch, use the cargo release plugin to bump either the patch, minor, or major version:
cargo release version patch -x
,cargo release version minor -x
orcargo release version major -x
. - Run the tests:
cargo test
- Commit these changes to git.
- Push the changes to GitHub.
- Do a PR from
dev
tomain
. - Wait for the test build.
- Merge the PR.
- Tag with version from step 2 as 'vVERSION' (lowercase 'v' followed by version number such as 'v0.0.5').
- Push the tag to GitHub. This triggers a release build in GitHub Actions.
- Wait until the release works. It may need some babysitting because the GitHub macOS and Windows builds are sometimes flaky).
- Switch to main branch:
git switch main
- Update local repo branch:
git pull
. - Create a build in preparation for of publication to crates.io:
cargo build --release
. - Publish to crates.io:
cargo release publish -x
(on occasion this needs babysitting too).