Skip to content

ci: publish the release notes as the GitHub release body - #50

Merged
craigmcchesney merged 1 commit into
mainfrom
ci/issue-release-notes-body
Sep 16, 2026
Merged

craigmcchesney merged 1 commit into
mainfrom
ci/issue-release-notes-body

Conversation

@craigmcchesney

Copy link
Copy Markdown
Collaborator

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 via body_path. Ahead of the 1.16.0 release (notes not yet written).

Two things that shaped the implementation

dp-python-lib's release.yml differs from dp-grpc's single-job workflow in ways that make a direct copy of the pattern wrong:

1. body_path overrides body — it is not a companion. In action-gh-release, releaseBody() returns the file contents and falls back to the body input only if the read fails. This workflow already sets a body with artifact verification and install instructions, so simply adding body_path beside it would have silently dropped those instructions from every release. They are concatenated with the notes instead, into dist/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 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: true still 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_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, so it skips the check.

Verification

Extracted both step scripts from the YAML and ran them directly:

  • Assembled body renders correctly — heredoc indentation stripped, fenced code blocks intact, backslash continuations and the cert-identity interpolation preserved.
  • Notes check exits 0 with the notes present, and exits 1 with the actionable message without them.
  • Workflow parses as YAML; SHA-pin invariant (grep check from CLAUDE.md) still returns nothing; ruff lint/format and the cookbook snippet checker all pass.

CLAUDE.md documents the convention, including the body_path-overrides-body trap and the write-notes-before-tagging requirement.

🤖 Generated with Claude Code

https://claude.ai/code/session_0151QFCHYMNBgEVNGLTgsoFL

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
Copilot AI lite review requested due to automatic review settings September 16, 2026 16:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 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_path and 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.

@craigmcchesney
craigmcchesney merged commit 12e5ebc into main Sep 16, 2026
7 checks passed
@craigmcchesney
craigmcchesney deleted the ci/issue-release-notes-body branch September 16, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants