Skip to content
Merged
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
50 changes: 50 additions & 0 deletions .github/workflows/changelog-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Generate Changelog

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
changelog:
name: Generate changelog
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Generate a changelog
uses: orhun/git-cliff-action@v4.4.2
with:
config: cliff.toml
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}

- name: Commit
id: commit
run: |
TAG=${GITHUB_REF#refs/tags/}
echo "tag=$TAG" >> $GITHUB_OUTPUT
branch_name="$TAG-changelog"

git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
set +e
git checkout -b "$branch_name"
git add CHANGELOG.md
git commit -m "chore: update changelog"
git push origin "$branch_name"

- name: Create Pull Request
uses: repo-sync/pull-request@v2
with:
destination_branch: main
source_branch: ${{ steps.commit.outputs.tag }}-changelog
pr_title: "chore: update changelog for ${{ steps.commit.outputs.tag }}"
pr_body: "Automated changelog update for release ${{ steps.commit.outputs.tag }}"
Loading