Skip to content

Commit 96f9d90

Browse files
authored
Create update-changelog.yaml
1 parent 42f8d3a commit 96f9d90

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Update Changelog"
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
jobs:
8+
update:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
# Give the default GITHUB_TOKEN write permission to commit and push the
13+
# updated CHANGELOG back to the repository.
14+
# https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
15+
contents: write
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.event.release.target_commitish }}
22+
23+
- name: Update Changelog
24+
uses: stefanzweifel/changelog-updater-action@v1
25+
with:
26+
latest-version: ${{ github.event.release.tag_name }}
27+
release-notes: ${{ github.event.release.body }}
28+
29+
- name: Commit updated CHANGELOG
30+
uses: stefanzweifel/git-auto-commit-action@v5
31+
with:
32+
branch: ${{ github.event.release.target_commitish }}
33+
commit_message: Update CHANGELOG
34+
file_pattern: CHANGELOG.md

0 commit comments

Comments
 (0)