-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1011 Bytes
/
update-changelog.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Update changelog for unreleased commits
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
permissions:
contents: write
jobs:
update-changelog:
name: Generate changelog
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # To use `git describe --tags`
- name: Setup Task
uses: arduino/setup-task@v2
- name: Generate changelog
uses: orhun/git-cliff-action@v3
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.md
- name: Commit Changelog
run : |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add CHANGELOG.md
git commit -m "Update CHANGELOG.md"
git push https://github.com/${{ github.repository }}.git HEAD:main