ci: publish the release notes as the GitHub release body - #50
Merged
Merged
Conversation
Releases carried only the artifact verification and install instructions, so the hand-written notes were not linked from the release page. Adopt dp-grpc's convention: one version-controlled document per release under doc/release-notes/rel-X.Y.Z.md, published via body_path. Two things differ from dp-grpc's single-job workflow and shape this change: action-gh-release treats `body_path` as an override of `body`, not a companion -- releaseBody() returns the file contents and falls back to `body` only if the read fails. Adding body_path beside the existing `body` would therefore have silently dropped the verification and install instructions from every release. They are concatenated with the notes instead, into dist/RELEASE_BODY.md. The publish job downloads artifacts but never checks out the repo, so a path under doc/ does not exist there. The body is assembled in the build job, which does check out, and rides along in the dist/ upload. It is excluded from the release `files` list (it is the body, not a download) and from the PyPI job's upload set, which would otherwise reject it. generate_release_notes still composes on top: the action appends its generated commit list after whatever body it resolves. The notes check runs before the build rather than being left to action-gh-release, which fails on a missing body_path only after everything has been built, signed, and uploaded -- a late failure that reads as unrelated to its cause. A workflow_dispatch rehearsal has no rel- tag to derive a filename from and so skips the check. Verified by extracting both step scripts from the YAML and running them: the assembled body renders correctly (heredoc indentation stripped, backslash continuations and the cert-identity interpolation intact), and the check passes with notes present and fails with the actionable message without them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0151QFCHYMNBgEVNGLTgsoFL
There was a problem hiding this comment.
🔵 Needs a closer look
Release workflow changes affect artifact assembly and publication behavior, warranting final human review.
Pull request overview
Updates the release workflow to publish versioned release notes while preserving release instructions.
Changes:
- Validate release notes before tagged builds.
- Assemble the combined release body.
- Publish it via
body_pathand exclude it from package uploads.
File summaries
| File | Description |
|---|---|
CLAUDE.md |
Documents release-note conventions and workflow behavior. |
.github/workflows/release.yml |
Validates, assembles, and publishes release notes. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adopt dp-grpc's release-notes convention: one version-controlled document per release at
doc/release-notes/rel-X.Y.Z.md, published as the GitHub release body viabody_path. Ahead of the 1.16.0 release (notes not yet written).Two things that shaped the implementation
dp-python-lib's
release.ymldiffers from dp-grpc's single-job workflow in ways that make a direct copy of the pattern wrong:1.
body_pathoverridesbody— it is not a companion. In action-gh-release,releaseBody()returns the file contents and falls back to thebodyinput only if the read fails. This workflow already sets abodywith artifact verification and install instructions, so simply addingbody_pathbeside it would have silently dropped those instructions from every release. They are concatenated with the notes instead, intodist/RELEASE_BODY.md.2. The publish job never checks out the repo. It only downloads artifacts, so a path under
doc/does not exist there. The body is assembled in thebuildjob (which does check out) and rides along in thedist/upload. It is excluded from the releasefileslist — it is the body, not a download — and from the PyPI job's upload set, which would otherwise reject it.generate_release_notes: truestill composes on top: the action appends its generated commit list after whatever body it resolves.Fail early on missing notes
The notes check runs before the build rather than being left to action-gh-release, which fails on a missing
body_pathonly after everything has been built, signed, and uploaded — a late failure that reads as unrelated to its cause. Aworkflow_dispatchrehearsal has norel-tag to derive a filename from, so it skips the check.Verification
Extracted both step scripts from the YAML and ran them directly:
cert-identityinterpolation preserved.grepcheck from CLAUDE.md) still returns nothing; ruff lint/format and the cookbook snippet checker all pass.CLAUDE.mddocuments the convention, including thebody_path-overrides-bodytrap and the write-notes-before-tagging requirement.🤖 Generated with Claude Code
https://claude.ai/code/session_0151QFCHYMNBgEVNGLTgsoFL