-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.37 KB
/
Copy pathchangelog.yml
File metadata and controls
54 lines (44 loc) · 1.37 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
name: Changelog
on:
repository_dispatch:
types: [release-completed]
workflow_dispatch:
concurrency:
group: changelog-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: write
pull-requests: write
jobs:
changelog:
name: Generate changelog
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: main
- name: Install git-cliff
run: |
curl -fsSL https://github.com/orhun/git-cliff/releases/download/v2.4.0/git-cliff-2.4.0-x86_64-unknown-linux-gnu.tar.gz -o git-cliff.tar.gz
tar -xzf git-cliff.tar.gz
sudo mv git-cliff-*/git-cliff /usr/local/bin/
git-cliff --version
- name: Generate full changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git-cliff --config cliff.toml --verbose -o CHANGELOG.md
- name: Commit and push changelog
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if git diff --quiet CHANGELOG.md; then
echo "No changes to changelog"
exit 0
fi
git add CHANGELOG.md
git commit -m "docs: update CHANGELOG.md [skip ci]"
git push origin main