Release workflow: curated notes support, input-handling hardening, and CLAUDE.md - #28
Merged
Conversation
The curated-notes and hardening changes were written independently per repository, which left the same logic expressed several different ways. Normalise the shared parts so the nine copies stay diffable: identical tag-existence test, identical curl invocation and continuation style, one wording for the tag-selection and credential comments, and consistent brace style. Drops an unused VERSION env entry from the analyze step. No behaviour change; only formatting, comments, and a dead variable.
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.
Summary
tag-release.ymlbuilds the GitHub release body from a Claude-generated changelog ofgit diff <last-tag>..HEAD. That is the right default for routine patch releases, but a milestone release deserves notes written by hand.This adds an opt-in path: if
.github/release-notes/v<version>.mdexists at the tagged ref, it becomes the release body verbatim.Mechanism
id: curated-notes) runs right after the tag-existence check and setsfound/path.&& steps.curated-notes.outputs.found != 'true'— when curated notes exist, no Claude API call is made at all./tmp/release_changelog.md(curated file or generated changelog) and/tmp/release_body.md(the full body).body:block tobody_path: /tmp/release_body.md, and the step summary reads the changelog file instead of interpolating an output.With curated notes present, the "📊 Release Statistics" block and the "🤖 Generated with Claude Code" footer are skipped — a hand-written milestone note shouldn't be followed by a commit-count table. The
# @robosystems/report-components v<version>header and the "🔗 Links" section (npm, full changelog, all releases) are always included.Default path is unchanged
With no curated file, the composed body is byte-for-byte identical to the current inline template — same header, changelog, stats fields (Commits / Files Changed / Components Updated / Styles Updated / Lines Added / Lines Deleted / Previous Release), links and footer. Verified by rendering
main's inlinebody:template and the new compose script with the same inputs and diffing: identical.Why the filename is version-specific
The file is looked up by exact version (
v1.0.0.md, notlatest.md), so a leftover notes file can never leak into a later release —v1.0.1simply won't findv1.0.0.mdand falls back to the generated changelog. Nothing to clean up after a milestone.Changelog content — generated or curated — is passed to the shell through env vars and written with
printf/cat, never spliced in via${{ ... }}(same# SECURITY (H2)discipline used elsewhere in these workflows).Test plan
yamllintclean apart from the file's pre-existing line-length/document-start style warnings; step graph parses with the expectedif:conditions.main's inline template with identical inputs — byte-for-byte identical, including a changelog containing shell metacharacters.create-release.ymldispatch (no curated file → unchanged output).Aligns this repo with roboledger-app PR #280.
Also in this PR
tag-release.ymlnow takes its git-derived values through the step'senv:block.CLAUDE.mdat the repo root — a short orientation for agents working here: commands and the local hook gate, source layout, the adapter-seam and public-API conventions, and the release/publish flow, including the curated-notes convention this PR adds (previously documented only as a comment inside the workflow).