-
Set the environment variable
TAG, which should be of the formv{VERSION}, whereVERSIONis the target version of the release. -
Change version in all subcrate
Cargo.tomlfiles and in the rootCargo.tomlto the target version. Also change the version of the subcrate dependencies in the rootCargo.toml. All versions should now match the target version. -
Update the CHANGELOG by creating a new release section header right the
## Unreleasedheader. -
Commit and push these changes:
git commit -a -m "(cargo-release) $TAG" && git push
-
Add a tag in git to mark the release:
git tag "$TAG" -m "Adds tag $TAG for release" && git push --tags
If for some reason the GitHub Actions release workflow failed with an error that needs to be fixed, you'll have to delete both the tag and corresponding release from GitHub. After you've pushed a fix, delete the tag from your local clone with
git tag -l | xargs git tag -d && git fetch -tThen repeat the steps above.