Restore simple workflow: Claude passes release notes directly

Back to the working pattern:
- Claude generates release notes
- Passes them directly to workflow via workflow_dispatch input
- No tag annotation reading complexity
- Simple: gh workflow run -f version=X.Y.Z -f release_notes="..."

This is what you wanted and what actually works reliably.
This commit is contained in:
rcourtman 2025-11-13 12:28:00 +00:00
parent 00da544541
commit 37c53a9d5f

View file

@ -7,6 +7,10 @@ on:
description: 'Version number (e.g., 4.30.0)'
required: true
type: string
release_notes:
description: 'Release notes (markdown) - generated by Claude'
required: true
type: string
jobs:
extract-version:
@ -32,8 +36,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Need full history to check tags
- name: Ensure VERSION file matches requested version
run: |
@ -46,18 +48,6 @@ jobs:
fi
echo "✓ VERSION file matches requested version ($REQUESTED_VERSION)"
- name: Check if tag already exists
run: |
TAG="${{ needs.extract-version.outputs.tag }}"
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "✓ Tag $TAG already exists (will use existing tag annotation)"
else
echo "::error::Tag $TAG does not exist. Please create an annotated tag with release notes first:"
echo "::error:: git tag -a $TAG -F /tmp/release_notes_${{ needs.extract-version.outputs.version }}.md"
echo "::error:: git push origin $TAG"
exit 1
fi
preflight-tests:
needs: version-guard
runs-on: ubuntu-latest
@ -321,29 +311,18 @@ jobs:
echo "Building release ${{ needs.extract-version.outputs.tag }}..."
./scripts/build-release.sh ${{ needs.extract-version.outputs.version }}
- name: Extract release notes from tag annotation
- name: Prepare release notes
id: generate_notes
env:
RELEASE_NOTES_INPUT: ${{ inputs.release_notes }}
run: |
TAG="${{ needs.extract-version.outputs.tag }}"
VERSION="${{ needs.extract-version.outputs.version }}"
echo "Reading release notes from tag annotation..."
echo "Using Claude-generated release notes from workflow input"
# Check if tag has an annotation (release notes from Claude)
TAG_MESSAGE=$(git tag -l --format='%(contents)' "${TAG}")
if [ -z "$TAG_MESSAGE" ] || [ "$TAG_MESSAGE" = "" ]; then
echo "::error::Tag ${TAG} has no annotation. Release notes must be provided by Claude."
echo "::error::Tags must be created with: git tag -a ${TAG} -F /tmp/release_notes_${VERSION}.md"
echo "::error::This ensures Claude writes user-focused, semantic changelog instead of raw commits."
exit 1
fi
echo "✓ Found release notes in tag annotation"
# Save tag annotation to file
# Save release notes to file
NOTES_FILE=$(mktemp)
echo "$TAG_MESSAGE" > "$NOTES_FILE"
printf "%s\n" "$RELEASE_NOTES_INPUT" > "$NOTES_FILE"
# Add installation instructions
cat >> "$NOTES_FILE" << EOF