Repository navigation
ci: automate workspace releases with release-plz (release/chain-0.23.x backport) - #2485
notmandatory wants to merge 6 commits into
Conversation
73e127a to
e05a94d
Compare
Keep the existing <crate>-<version> tag scheme and configure a separate CHANGELOG.md for every workspace crate. (cherry picked from commit dffa080)
Prepare per-crate versions and changelogs in a release PR, then publish unpublished crates with crates.io trusted publishing and environment-gated approval. (cherry picked from commit 4ff8c07)
(cherry picked from commit 6fe84f3)
Document the release PR and publish workflow, remove the manual release issue templates, and note that crate changelogs are generated from Conventional Commits. (cherry picked from commit be33975)
(cherry picked from commit 62301a8)
e05a94d to
9dbae27
Compare
Releases are now driven by the manual release-plz workflow, so the fixed 4-week cadence and feature-freeze description no longer apply. (cherry picked from commit d1db8d1)
9dbae27 to
3948f22
Compare
|
Test of this new workflow on my fork plus CHANGELOG cleanup using LLM's help here: notmandatory#37 |
| Once the project reaches a more mature state (>= `1.0.0`), we will very likely switch to longer release cycles of **6 weeks**. | ||
| 1. Trigger the **Release-plz** workflow on the branch. The `release-pr` job opens or updates a release PR containing the version bumps and `CHANGELOG.md` changes for every workspace crate that has changes. | ||
| 2. Review the release PR. Changelogs are generated from [Conventional Commits], so do not edit them by hand. Merge the PR once CI passes. | ||
| 3. Trigger the **Release-plz** workflow again on the same branch. The `release` job publishes every unpublished crate to crates.io, pushes a `<crate>-<version>` tag for each crate, and creates the matching GitHub release. A reviewer must approve the `release` environment before publishing starts. |
There was a problem hiding this comment.
Could the tags be signed after release-plz creates them? Like maintainers vouching the release.
I'm not referring to release-plz handling the signing, but us pulling the tags, signing, and then pushing again.
There was a problem hiding this comment.
This should be possible, after the release is tagged the release-plz workflow doesn't have anything else to do with it. But I don't think this is the best way to accomplish signed releases. I'd rather use a tool like cargo-crev see bitcoindevkit/bdk_wallet#625. We could ask the maintainers who worked on the release to sign them.
There was a problem hiding this comment.
After reading some more about cargo-crev it doesn't look like it would handle what you (and I) would like to see with multi-signed tags or crate releases. My preference right now is to stick with this github workflow which uses the crates.io trusted publishing feature + permissions in github that require two approvers (the workflow initiator +1 more from the release team). Long term the rust team is working on a signing scheme here: rust-lang/rfcs#3724.
Description
Adds manually triggered release-plz automation for all workspace crates.
.github/workflows/release-plz.yml:release-propens/updates a release PR with version bumps andCHANGELOG.mdupdates for each changed crate.releasepublishes unpublished crates to crates.io via OIDC trusted publishing (no registry token), creates<crate>-<version>tags, and creates GitHub releases. Publishing is gated by thereleaseenvironment.release-plz.tomlto:chain-0.23.4.CHANGELOG.mdfor every workspace crate.release_always = false).releaselabel to release PRs.DEVELOPMENT_CYCLE.mdwith the new release process.minor_release.mdandpatch_release.mdissue templates.actions-rust-lang/setup-rust-toolchainfromv1tov2for consistency with the new workflow and the referenced bdk-cli change.Notes to the reviewers
Backport of #2448, cherry-picked and adapted commits to the
release/chain-0.23.xbranch.The workflow is manual-only, so merging this PR does not publish anything. release-plz supports only one open release PR per repository.
Before the first release, these settings are required:
RELEASE_PLZ_APP_IDandRELEASE_PLZ_PRIVATE_KEYsecrets must be available to this repository, and the GitHub App must be installed here with Contents and Pull requests read/write permissions.releaseenvironment with required reviewers.release-plz.ymland environmentrelease.The first run should be from a
release/*branch or after syncingmasterwith crates.io, because master's crate versions currently lag the published versions (for examplebdk_chainis0.23.2on master vs0.23.4on crates.io). This is documented inDEVELOPMENT_CYCLE.md.Existing
release/chain-0.23.xbranches do not contain the new workflow file; it must be added there before running release-plz on that branch.Two behavior changes to note:
The
setup-rust-toolchainbump is not required by release-plz; it was carried over from the bdk-cli PR and can be dropped if we want this PR narrowly scoped.Checklists
All Submissions:
New Features: