chore: automate releases with Release-plz #545
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Releasing the console crates has been a bit of a hassle. It requires
manual work run locally and as such, we have gone long periods without
releases, despite having changes which would be worth releasing.
Release-plz provides release automation based on GitHub actions. It
will create, and then update a PR for the next release.
Release-plz depends on conventional commits (which the
console
project is already following) to determine the next version number for
each crate and then uses cargo-semver-checks to check that the version
bump is correct.
For the changelogs, git-cliff is used. Since we already started using
in #416, so we can reuse our existing
cliff.toml
config file. A smallchange has been made to remove the footer, as it was getting included
multiple times in a single changelog file due to the delta updates.
Caution: In order to use Release-plz, a crates.io token first needs
to be added to the GitHub project. This means that anyone with PR merge
rights will be able to run a release by merging the Release PR.
Additionally, GitHub actions need to be given permission to create PRs.
The previous scripts used to release have been removed.
Review Notes (DO NOT INCLUDE IN COMMIT MESSAGE)
To test the functionality of Release-plz, I copied
console
into a separateproject hds_console and played around with it there first.
The series of test PRs can be seen at: https://github.com/hds/hds_console/pulls?q=is%3Apr+is%3Aclosed
This released a series of test crates. The version history for each is:
The first release of each of the test crates was performed with the
existing release script. The subsequent releases were performed
by Release-Plz.