Skip to content

Commit 76f1840

Browse files
authored
Create generate-changelog.yml
Adds workflow to generate changelog on push to master.
1 parent 12d88fe commit 76f1840

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Generate Changelog
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
changelog:
13+
name: Generate changelog
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Generate changelog
22+
uses: orhun/git-cliff-action@v4
23+
with:
24+
config: cliff.toml
25+
args: --verbose
26+
env:
27+
OUTPUT: CHANGELOG.md
28+
GITHUB_REPO: ${{ github.repository }}
29+
30+
- name: Commit
31+
run: |
32+
git config user.name 'github-actions[bot]'
33+
git config user.email 'github-actions[bot]@users.noreply.github.com'
34+
git add CHANGELOG.md
35+
git commit -m "docs: update changelog"
36+
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git master

0 commit comments

Comments
 (0)