Skip to content

ci: automate workspace releases with release-plz (release/chain-0.23.x backport) - #2485

Open
notmandatory wants to merge 6 commits into
bitcoindevkit:release/chain-0.23.xfrom
notmandatory:ci/add_release_plz_backport
Open

notmandatory wants to merge 6 commits into
bitcoindevkit:release/chain-0.23.xfrom
notmandatory:ci/add_release_plz_backport

Conversation

@notmandatory

@notmandatory notmandatory commented Dec 2, 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

Backport of #2448, cherry-picked and adapted commits to the release/chain-0.23.x branch.

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

@github-project-automation github-project-automation Bot moved this to Triage in BDK Chain Dec 2, 2026
@notmandatory notmandatory self-assigned this Dec 2, 2026
@notmandatory notmandatory added release Release related issue or PR github_actions Pull requests that update GitHub Actions code backport A bug fix or security patch to be ported to a previous release labels Dec 2, 2026
@notmandatory notmandatory moved this from Triage to In Progress in BDK Chain Dec 2, 2026
@notmandatory notmandatory added this to the Chain 0.23.4 milestone Dec 2, 2026
@notmandatory
notmandatory force-pushed the ci/add_release_plz_backport branch from 73e127a to e05a94d Compare December 2, 2026 23:02
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)
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)
@notmandatory
notmandatory force-pushed the ci/add_release_plz_backport branch from e05a94d to 9dbae27 Compare December 3, 2026 00:17
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)
@notmandatory
notmandatory force-pushed the ci/add_release_plz_backport branch from 9dbae27 to 3948f22 Compare December 3, 2026 00:44
@notmandatory

Copy link
Copy Markdown
Contributor Author

Test of this new workflow on my fork plus CHANGELOG cleanup using LLM's help here: notmandatory#37

@notmandatory notmandatory moved this from In Progress to Needs Review in BDK Chain Dec 3, 2026

@nymius nymius 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.

cACK 3948f22

Comment thread DEVELOPMENT_CYCLE.md
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.

@nymius nymius Dec 3, 2026 •

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.

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.

@notmandatory notmandatory Dec 3, 2026 •

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.

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.

@notmandatory notmandatory Dec 4, 2026 •

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.

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.

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

Labels

backport A bug fix or security patch to be ported to a previous release 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.

2 participants