Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Generate Changelog

on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: write

jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main

- name: Generate changelog
uses: requarks/changelog-action@v1
id: changelog
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
writeToFile: true
includeInvalidCommits: false

- name: Commit CHANGELOG.md
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add CHANGELOG.md
git diff --staged --quiet || git commit -m "docs: update changelog for ${{ github.ref_name }}"
git push

- name: Update release notes
if: github.event_name != 'workflow_dispatch'
uses: softprops/action-gh-release@v2
with:
body: ${{ steps.changelog.outputs.changes }}
tag_name: ${{ github.ref_name }}
Loading