Skip to content

Commit 4540bcd

Browse files
committed
chore: add changelog generation to workflow
1 parent 349f19a commit 4540bcd

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,28 @@ jobs:
296296
id: version
297297
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
298298

299+
- name: Get previous tag
300+
id: prev_tag
301+
run: |
302+
PREV_TAG=$(git describe --tags --abbrev=0 ${{ github.ref_name }}^ 2>/dev/null || echo "")
303+
echo "PREV_TAG=${PREV_TAG}" >> $GITHUB_OUTPUT
304+
305+
- name: Generate changelog
306+
id: changelog
307+
uses: warpdotdev/warp-agent-action@main
308+
with:
309+
prompt: |
310+
Generate a changelog for the release ${{ github.ref_name }}.
311+
312+
1. Use git to get the list of commits between ${{ steps.prev_tag.outputs.PREV_TAG || 'the beginning of the repository' }} and ${{ github.ref_name }}.
313+
2. Format the output as a markdown bullet list.
314+
3. Each bullet point should be a natural language description of the change, not just the raw commit message. Rewrite commit messages to be clear, user-friendly descriptions.
315+
4. Include the category (feature, bug fix, documentation, etc.) at the start of each bullet point based on commit message prefixes like "feat:", "fix:", "docs:", "chore:", etc.
316+
5. If there is no previous tag, include all commits up to ${{ github.ref_name }}.
317+
318+
Output only the formatted changelog markdown, nothing else.
319+
warp_api_key: ${{ secrets.WARP_API_KEY }}
320+
299321
- name: Create GitHub Release
300322
uses: softprops/action-gh-release@v2
301323
env:
@@ -322,7 +344,7 @@ jobs:
322344
323345
## Changes
324346
325-
See the [commits](https://github.com/captainsafia/grove/compare/v${{ steps.version.outputs.VERSION }}...HEAD) for details.
347+
${{ steps.changelog.outputs.agent_output }}
326348
draft: false
327349
prerelease: false
328350
files: |

0 commit comments

Comments
 (0)