icebear0828 Claude Opus 4.6 commited on
Commit
984bd7e
·
1 Parent(s): 663cb2b

fix: generate clean release notes from git log

Browse files

Sync release.yml with electron to avoid future merge conflicts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. .github/workflows/release.yml +21 -1
.github/workflows/release.yml CHANGED
@@ -84,10 +84,30 @@ jobs:
84
  path: artifacts
85
  merge-multiple: true
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  - name: Create GitHub Release
88
  uses: softprops/action-gh-release@v2
89
  with:
90
- generate_release_notes: true
91
  draft: false
92
  prerelease: false
93
  files: artifacts/*
 
84
  path: artifacts
85
  merge-multiple: true
86
 
87
+ - name: Generate release notes
88
+ id: notes
89
+ run: |
90
+ PREV_TAG=$(git tag --sort=-v:refname | grep '^v' | sed -n '2p')
91
+ if [ -z "$PREV_TAG" ]; then
92
+ BODY="Initial release"
93
+ else
94
+ BODY=$(git log "${PREV_TAG}..HEAD" --no-merges --pretty=format:"%s" \
95
+ | grep -vE "^(chore|docs|ci)(\(.*\))?:" \
96
+ | sed 's/^/- /')
97
+ if [ -z "$BODY" ]; then
98
+ BODY="Bug fixes and improvements"
99
+ fi
100
+ fi
101
+ {
102
+ echo "NOTES<<EOFNOTES"
103
+ echo "$BODY"
104
+ echo "EOFNOTES"
105
+ } >> "$GITHUB_OUTPUT"
106
+
107
  - name: Create GitHub Release
108
  uses: softprops/action-gh-release@v2
109
  with:
110
+ body: ${{ steps.notes.outputs.NOTES }}
111
  draft: false
112
  prerelease: false
113
  files: artifacts/*