Repository navigation
ci: automate workspace releases with release-plz - #2448
notmandatory wants to merge 5 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2448 +/- ##
=======================================
Coverage 83.62% 83.62%
=======================================
Files 31 31
Lines 6339 6339
Branches 292 292
=======================================
Hits 5301 5301
Misses 970 970
Partials 68 68
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
cf73b5e to
9522922
Compare
| ### Changelog notice | ||
|
|
||
| <!-- Notice the release manager should include in the release tag message changelog --> | ||
| <!-- See https://keepachangelog.com/en/1.0.0/ for examples --> | ||
|
|
There was a problem hiding this comment.
we should keep this in the PR template, so the author fill it with proper changes from their PRs
There was a problem hiding this comment.
I'd also rather use the PR review to enforce good commit messages instead of using this section of the PR which often needs to be re-worded by the release team anyway. I'm hoping once everyone gets in the habit of using commit messages for the changelog the release process will require much less manual work.
There was a problem hiding this comment.
I've also created an LLM skill that I'll post somewhere in the .github repo that does a good job of cleaning up the repo CHANGELOGs.
| All notable changes to this project can be found here and in each release's git tag and can be viewed with `git tag -ln100 "v*"`. See also [DEVELOPMENT_CYCLE.md](../../DEVELOPMENT_CYCLE.md) for more details. | ||
|
|
||
| Contributors do not need to change this file but do need to add changelog details in their PR descriptions. The person making the next release will collect changelog details from included PRs and edit this file prior to each release. | ||
| This file is updated automatically by [release-plz](https://release-plz.dev) from [Conventional Commits](https://www.conventionalcommits.org/). Do not edit it manually. |
There was a problem hiding this comment.
I'm not sure if it's a good idea to have this being auto-generated, I mean not unless we have another CI step enforcing conventional commits usage on every commit.
There was a problem hiding this comment.
The CONTRIBUTING guide already lets people know that commit messages should follow the conventional commits style. And even with the release-plz action the auto-generated release PR with the changelog can still be edited by hand before merging and doing the actual release.
As for enforcing conventional commits with a CI step, I'd rather not hold this PR up for that since we can enforce it manually for now.
|
I did a test run in my fork of this repo to show what the release PR created by |
|
I did a little search for conventional commits linting tools and there are a few out there, but I didn't find any that are widely used. Also they all have a lot of dependencies for a simple task. Checking commit messages should be something easy to do manually and/or make sure an LLM reviewer checks, which they should already do if they read the CONTRIBUTING.md file. |
tvpeter
left a comment
There was a problem hiding this comment.
Thank you for working on this @notmandatory .
I have left some coments.
Keep the existing <crate>-<version> tag scheme and configure a separate CHANGELOG.md for every workspace crate.
Prepare per-crate versions and changelogs in a release PR, then publish unpublished crates with crates.io trusted publishing and environment-gated approval.
Document the release PR and publish workflow, remove the manual release issue templates, and note that crate changelogs are generated from Conventional Commits.
a4ff81f to
541c15b
Compare
|
Updated release PR with LLM improved CHANGELOGs here: notmandatory/bdk#33 |
|
The agent SKILL I used to cleanup the release-plz generated CHANGELOGs is here: bitcoindevkit/.github#125 |
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
This is based on bitcoindevkit/bdk-cli#335.
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: