Skip to content

Commit 81d34df

Browse files
lesnik512claude
andcommitted
ci(release): require curated notes for stable tags
Fail the release before `just publish` (irreversible) when a stable tag has no planning/releases/<tag>.md, instead of silently falling back to GitHub's auto-generated notes. Pre-release tags stay exempt and keep the fallback. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f1a3f8e commit 81d34df

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,25 @@ jobs:
2323
- uses: extractions/setup-just@v4
2424
- uses: astral-sh/setup-uv@v7
2525

26+
# Curated release notes are MANDATORY for a stable tag. This runs BEFORE
27+
# `just publish` (which is irreversible) so a missing notes file aborts
28+
# the release before anything reaches PyPI — rather than silently shipping
29+
# with GitHub's auto-generated notes. Pre-release tags (a letter in the
30+
# name, e.g. 2.0.0rc1) are exempt and keep the auto-generated fallback.
31+
- name: Require curated release notes (stable tags)
32+
run: |
33+
set -euo pipefail
34+
if [[ "$GITHUB_REF_NAME" =~ [a-z] ]]; then
35+
echo "Pre-release ${GITHUB_REF_NAME}: curated notes not required."
36+
exit 0
37+
fi
38+
notes="planning/releases/${GITHUB_REF_NAME}.md"
39+
if [ ! -f "$notes" ]; then
40+
echo "::error::Stable tag ${GITHUB_REF_NAME} has no curated release notes at ${notes}. Write the notes, commit to main, and re-tag." >&2
41+
exit 1
42+
fi
43+
echo "Found curated release notes: ${notes}"
44+
2645
# PyPI is irreversible, so it runs FIRST: if it fails the job stops and no
2746
# GitHub Release is created advertising a version that never reached PyPI.
2847
# `just publish` derives the version from $GITHUB_REF_NAME (the tag name).

0 commit comments

Comments
 (0)