ci: Automate releases via release-plz with OIDC trusted publishing#5
Merged
ci: Automate releases via release-plz with OIDC trusted publishing#5
Conversation
Two jobs run on every push to main:
- release-pr: opens/updates a "Release vX.Y.Z" PR with the
Cargo.toml bump and changelog. Merging that PR ships the release.
- release: when the merged commit's Cargo.toml version is
unreleased, tags it, creates a GitHub Release, and publishes
to crates.io via OIDC trusted publishing.
semver_check = true uses cargo-semver-checks (rustdoc JSON diff)
to force a major bump if breaking changes are detected.
Workflow filename kept as release.yml to match the existing
crates.io trusted publisher configuration.
d744f21 to
8f2dfc0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Sets up release-plz to handle the release process end-to-end, so future releases can be cut entirely from the GitHub mobile app.
How it works
A single workflow runs on every push to
main:Cargo.tomlbump and a generated changelog.Version bump logic
semver_check = trueruns cargo-semver-checks against rustdoc JSON of the last published version:Notes
release.ymlto match the existing crates.io trusted publisher configuration.cargo-semver-checksis invoked by release-plz; it auto-installs the nightly toolchain it needs via the runner's pre-installedrustup.mainwill open the first release PR (proposing 2.2.1).