Skip to content

Commit 9a700e4

Browse files
ashwin-antclaude
andcommitted
chore: use CHANGELOG.md content for GitHub release notes
Replace auto-generated release notes with content extracted from CHANGELOG.md for the specific version being released. This provides more structured and consistent release notes with proper sections like Bug Fixes, New Features, etc. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 5752f38 commit 9a700e4

File tree

1 file changed

+31
-17
lines changed

1 file changed

+31
-17
lines changed

.github/workflows/create-release-tag.yml

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ jobs:
2424
VERSION="${BRANCH_NAME#release/v}"
2525
echo "version=$VERSION" >> $GITHUB_OUTPUT
2626
27-
- name: Get previous release tag
28-
id: previous_tag
29-
run: |
30-
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD~1 2>/dev/null || echo "")
31-
echo "previous_tag=$PREVIOUS_TAG" >> $GITHUB_OUTPUT
32-
3327
- name: Create and push tag
3428
run: |
3529
git config --local user.email "github-actions[bot]@users.noreply.github.com"
@@ -46,14 +40,34 @@ jobs:
4640
env:
4741
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4842
run: |
49-
# Create release with auto-generated notes
50-
gh release create "v${{ steps.extract_version.outputs.version }}" \
51-
--title "Release v${{ steps.extract_version.outputs.version }}" \
52-
--generate-notes \
53-
--notes-start-tag "${{ steps.previous_tag.outputs.previous_tag }}" \
54-
--notes "Published to PyPI: https://pypi.org/project/claude-agent-sdk/${{ steps.extract_version.outputs.version }}/
55-
56-
### Installation
57-
\`\`\`bash
58-
pip install claude-agent-sdk==${{ steps.extract_version.outputs.version }}
59-
\`\`\`"
43+
VERSION="${{ steps.extract_version.outputs.version }}"
44+
45+
# Extract changelog section for this version to a temp file
46+
awk -v ver="$VERSION" '
47+
/^## / {
48+
if (found) exit
49+
if ($2 == ver) found=1
50+
next
51+
}
52+
found { print }
53+
' CHANGELOG.md > release_notes.md
54+
55+
# Append install instructions
56+
cat >> release_notes.md << 'EOF'
57+
58+
---
59+
60+
**PyPI:** https://pypi.org/project/claude-agent-sdk/VERSION/
61+
62+
```bash
63+
pip install claude-agent-sdk==VERSION
64+
```
65+
EOF
66+
67+
# Replace VERSION placeholder
68+
sed -i "s/VERSION/$VERSION/g" release_notes.md
69+
70+
# Create release with notes from file
71+
gh release create "v$VERSION" \
72+
--title "v$VERSION" \
73+
--notes-file release_notes.md

0 commit comments

Comments
 (0)