Skip to content

Commit 3a91048

Browse files
heysamtexasclaude
andcommitted
fix: use commitizen's built-in changelog generation in release workflow
- Remove separate changelog generation step that was failing with 'No commits found' - Let 'cz bump' handle changelog generation automatically (safer, atomic operation) - Extract latest release notes from generated CHANGELOG.md file - Add fallback message if changelog extraction fails - This follows commitizen best practices and eliminates race conditions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 0b34064 commit 3a91048

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,16 @@ jobs:
6565
git push origin master
6666
git push origin --tags
6767
68-
- name: Generate release notes
68+
- name: Extract latest changelog entry
6969
run: |
70-
uv run cz changelog --dry-run --incremental > RELEASE_NOTES.md
70+
# Extract the latest release notes from CHANGELOG.md
71+
sed -n '/^## v${{ env.NEW_VERSION }}/,/^## /p' CHANGELOG.md | sed '$d' > RELEASE_NOTES.md
72+
# If extraction failed, use a fallback message
73+
if [ ! -s RELEASE_NOTES.md ]; then
74+
echo "## v${{ env.NEW_VERSION }}" > RELEASE_NOTES.md
75+
echo "" >> RELEASE_NOTES.md
76+
echo "Release v${{ env.NEW_VERSION }}" >> RELEASE_NOTES.md
77+
fi
7178
7279
- name: Create GitHub Release
7380
uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)