Skip to content

Commit a1a4d00

Browse files
fix(release): align Release PR title and checklist (#10994)
1 parent 252393b commit a1a4d00

3 files changed

Lines changed: 78 additions & 19 deletions

File tree

.github/workflows/release.yml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release workflow: crate publishing and GitHub Release creation.
22
#
3-
# Changelog generation is handled by release-plz + git-cliff.
3+
# Changelogs are authored in source PRs and finalized before release.
44
#
55
# Pipeline:
66
# push to main → creates/updates the single Release PR
@@ -27,7 +27,7 @@ jobs:
2727
#
2828
# Runs on every push to main. Detects changed crates by comparing local
2929
# source against crates.io, bumps versions based on conventional commits,
30-
# generates per-crate changelogs, and opens/updates a single Release PR.
30+
# and opens or updates a single Release PR.
3131
release-pr:
3232
name: Create or update Release PR
3333
if: github.event_name == 'push'
@@ -56,11 +56,42 @@ jobs:
5656
persist-credentials: false
5757
token: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
5858
- name: Create or update Release PR
59+
id: release-plz-pr
5960
uses: release-plz/action@e8792575c7f2366cf6ff3ccc33ead9ace5b691c7 #v0.5.130
6061
with:
6162
command: release-pr
6263
env:
6364
GITHUB_TOKEN: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
65+
- name: Add zebrad version to Release PR title
66+
env:
67+
GH_TOKEN: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
68+
RELEASE_PRS: ${{ steps.release-plz-pr.outputs.prs }}
69+
run: |
70+
set -euo pipefail
71+
72+
ZEBRAD_RELEASE_PR="$(jq -c '
73+
map(select(any(.releases[]?; .package_name == "zebrad")))
74+
| first // empty
75+
' <<< "${RELEASE_PRS:-[]}")"
76+
77+
if [ -z "${ZEBRAD_RELEASE_PR}" ]; then
78+
echo "No zebrad release in release-plz output; keeping the generated title."
79+
exit 0
80+
fi
81+
82+
PR_NUMBER="$(jq -r '.number' <<< "${ZEBRAD_RELEASE_PR}")"
83+
VERSION="$(jq -r '
84+
.releases[] | select(.package_name == "zebrad") | .version
85+
' <<< "${ZEBRAD_RELEASE_PR}")"
86+
87+
if [ -z "${PR_NUMBER}" ] || [ "${PR_NUMBER}" = "null" ] || [ -z "${VERSION}" ] || [ "${VERSION}" = "null" ]; then
88+
echo "::error::release-plz did not return both the PR number and zebrad version: ${ZEBRAD_RELEASE_PR}"
89+
exit 1
90+
fi
91+
92+
gh pr edit "${PR_NUMBER}" \
93+
--repo "${GITHUB_REPOSITORY}" \
94+
--title "chore: release v${VERSION}"
6495
6596
# ── Stage 2: Publish crates and create the public zebrad release ────────
6697
#

.release-plz.toml

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,51 @@ release_commits = "^(feat|fix|perf|refactor|build)"
2828
pr_labels = ["A-release"]
2929

3030
pr_body = """
31-
## Review the Release PR
32-
33-
- [ ] Version bumps match user-visible changes for each crate (`major` for network upgrades or breaking API, `minor` for new API/behavior/RPC/config, `patch` otherwise)
34-
- [ ] Each changed crate's `[Unreleased]` entries follow the Changelog Guidelines (operator-focused in the root `CHANGELOG.md`, crate-consumer-focused per crate)
35-
- [ ] `[Unreleased]` has been renamed to the release heading (`## [Zebra <version>]` in the root, `## [<version>]` per crate)
36-
- [ ] No git dependencies remain in crates publishing to crates.io (`check-no-git-dependencies`)
37-
- [ ] Any required checkpoint, end-of-support height, README, or operational changes already landed
38-
- [ ] `RELEASE_APP_ID` and `RELEASE_APP_PRIVATE_KEY` are configured at repository or organization scope
39-
- [ ] Merge only when crates should publish and the public `zebrad` GitHub Release should be created
40-
41-
## Release Summary
31+
## Release summary
4232
4333
{% for release in releases %}
44-
- `{{ release.package }}`: {% if release.previous_version and release.previous_version != release.next_version %}{{ release.previous_version }} -> {% endif %}{{ release.next_version }}
34+
- `{{ release.package }}`: {% if release.previous_version and release.previous_version != release.next_version %}{{ release.previous_version }} {% endif %}{{ release.next_version }}
4535
{%- endfor %}
4636
37+
## Review this release
38+
39+
Review the latest commit after all intended changes have landed on `main` and release-plz has finished updating this PR.
40+
41+
### Release prerequisites
42+
43+
- [ ] No unintended prerelease dependency versions remain.
44+
45+
For releases that include `zebrad`:
46+
47+
- [ ] A full sync completed after the latest state change, or no new full sync is required.
48+
- [ ] Mainnet and Testnet checkpoints are current for this release.
49+
50+
### Release contents
51+
52+
- [ ] If `zebrad` is included, the root changelog covers every operator-visible change since the previous `zebrad` release.
53+
- [ ] Each crate changelog covers every consumer-visible change since that crate's previous release.
54+
- [ ] Changelog entries describe the final behavior, use the correct category, and link the relevant pull requests.
55+
56+
### Versions
57+
58+
- [ ] If `zebrad` is included, its proposed version follows the release policy, and its stable or prerelease status is correct.
59+
- [ ] Each crate version follows Cargo SemVer for its API and behavior changes, and dependency-only releases use the smallest required bump.
60+
- [ ] Every release heading matches the corresponding version in the release summary.
61+
62+
### Release data and documentation
63+
64+
For releases that include `zebrad`:
65+
66+
- [ ] The end-of-support height matches the intended release date.
67+
- [ ] Network-upgrade activation heights and the minimum network protocol version are correct, when applicable.
68+
- [ ] README, installation, compatibility, and operational documentation match the release.
69+
70+
### Approval
71+
72+
- [ ] This exact commit is ready to publish.
73+
74+
Merging this PR publishes the listed crates and creates their git tags. If `zebrad` is listed, the workflow also creates the public GitHub Release and starts the binary, Docker, and GCP release workflows.
75+
4776
---
4877
This PR was generated with [release-plz](https://github.com/release-plz/release-plz/).
4978
"""

book/src/dev/release-process.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,12 @@ To help ensure that you have sufficient time and a clear path to update, this is
128128

129129
## Release candidate & release process
130130

131-
Stable releases are generated from `main` by `release-plz`.
132-
After each push to `main`, release-plz opens or updates a Release PR when it finds releasable crate changes.
133-
The generated Release PR contains version bumps and changelog updates for the crates that changed.
134-
The Release PR is the manual review gate: after maintainers review and merge it, the release workflow publishes crates to crates.io, creates the release git tags, and creates the public `zebrad` GitHub Release.
131+
Releases are generated from `main` by `release-plz`. After each push to `main`, release-plz opens or updates a Release PR when it finds releasable crate changes. The generated PR contains the proposed version bumps and a summary of the crates to publish; when it includes `zebrad`, the PR title identifies the proposed `zebrad` version.
132+
133+
The Release PR is the manual review gate. After maintainers review and merge it, the release workflow publishes crates to crates.io, creates the release git tags, and creates the public `zebrad` GitHub Release.
135134

136135
The `zebrad` GitHub Release triggers the downstream release workflows that build and publish signed Docker images, attach signed, checksummed standalone `zebrad` binaries (Linux `x86_64` and `aarch64`) to the GitHub Release, and deploy long-lived GCP nodes.
137-
Until release-preparation data is automated, any required checkpoint, end-of-support height, README, or operational release-note changes should land on `main` before the generated Release PR is merged.
136+
Changelogs are authored in source PRs rather than generated by release-plz. Final release headings and any required checkpoint, end-of-support height, README, or operational release-note changes must land on `main` before maintainers approve the generated Release PR.
138137

139138
release-plz embeds the release checklist in the generated Release PR body using the `pr_body` configured in `.release-plz.toml`.
140139
GitHub pull request templates are only used when a maintainer manually opens a pull request in the GitHub UI.

0 commit comments

Comments
 (0)