Skip to content

ci: automate workspace releases with release-plz - #2448

Open
notmandatory wants to merge 5 commits into
bitcoindevkit:masterfrom
notmandatory:ci/add_release_plz
Open

notmandatory wants to merge 5 commits into
bitcoindevkit:masterfrom
notmandatory:ci/add_release_plz

Conversation

@notmandatory

@notmandatory notmandatory commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds manually triggered release-plz automation for all workspace crates.

  • Adds .github/workflows/release-plz.yml:
    • release-pr opens/updates a release PR with version bumps and CHANGELOG.md updates for each changed crate.
    • release publishes unpublished crates to crates.io via OIDC trusted publishing (no registry token), creates <crate>-<version> tags, and creates GitHub releases. Publishing is gated by the release environment.
  • Adds release-plz.toml to:
    • Preserve bdk's existing tag naming, e.g. chain-0.23.4.
    • Keep a separate CHANGELOG.md for every workspace crate.
    • Only publish after the release PR is merged (release_always = false).
    • Add the release label to release PRs.
  • Updates DEVELOPMENT_CYCLE.md with the new release process.
  • Removes the manual minor_release.md and patch_release.md issue templates.
  • Removes the changelog section from the PR template and updates crate changelog headers to note they are generated from Conventional Commits.
  • Bumps actions-rust-lang/setup-rust-toolchain from v1 to v2 for 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:

  • The RELEASE_PLZ_APP_ID and RELEASE_PLZ_PRIVATE_KEY secrets must be available to this repository, and the GitHub App must be installed here with Contents and Pull requests read/write permissions.
  • A release environment with required reviewers.
  • crates.io trusted publishing configured for all seven crates with workflow release-plz.yml and environment release.

The first run should be from a release/* branch or after syncing master with crates.io, because master's crate versions currently lag the published versions (for example bdk_chain is 0.23.2 on master vs 0.23.4 on crates.io). This is documented in DEVELOPMENT_CYCLE.md.

Existing release/chain-0.23.x branches do not contain the new workflow file; it must be added there before running release-plz on that branch.

Two behavior changes to note:

  • release-plz creates tags through the GitHub API, so tags are not GPG-signed.
  • release-plz creates its release PR commit through the GitHub API, which GitHub marks as Verified.

The setup-rust-toolchain bump 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:

  • I've added docs for the new feature

@notmandatory
notmandatory requested a review from a team as a code owner October 29, 2026 17:38
@github-project-automation github-project-automation Bot moved this to Triage in BDK Chain Oct 29, 2026
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.62%. Comparing base (c5e87cc) to head (541c15b).

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           
Flag Coverage Δ
rust 83.62% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@notmandatory notmandatory moved this from Triage to Needs Review in BDK Chain Oct 30, 2026
@notmandatory notmandatory self-assigned this Oct 30, 2026
@notmandatory notmandatory added the chore Non-coding related work label Oct 30, 2026
@oleonardolima
oleonardolima self-requested a review November 1, 2026 02:30
@oleonardolima oleonardolima added release Release related issue or PR github_actions Pull requests that update GitHub Actions code labels Nov 1, 2026
@oleonardolima oleonardolima added this to the Chain 0.24.0 milestone Nov 1, 2026
Comment on lines -12 to -16
### Changelog notice

<!-- Notice the release manager should include in the release tag message changelog -->
<!-- See https://keepachangelog.com/en/1.0.0/ for examples -->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should keep this in the PR template, so the author fill it with proper changes from their PRs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread crates/chain/CHANGELOG.md
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@notmandatory

Copy link
Copy Markdown
Contributor Author

I did a test run in my fork of this repo to show what the release PR created by release-plz looks like. I also added a commit to show what a little LLM generated cleanup of the change logs looks like. See:

notmandatory#30

@notmandatory

Copy link
Copy Markdown
Contributor Author

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 tvpeter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this @notmandatory .

I have left some coments.

Comment thread .github/workflows/cont_integration.yml Resolved
Comment thread release-plz.toml Resolved
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.

@tvpeter tvpeter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 541c15b

Thank you.

@notmandatory

Copy link
Copy Markdown
Contributor Author

Updated release PR with LLM improved CHANGELOGs here: notmandatory/bdk#33

@notmandatory

Copy link
Copy Markdown
Contributor Author

The agent SKILL I used to cleanup the release-plz generated CHANGELOGs is here: bitcoindevkit/.github#125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Non-coding related work github_actions Pull requests that update GitHub Actions code release Release related issue or PR

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

3 participants