File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Update CHANGELOG
2+ on :
3+ push :
4+ branches :
5+ - main
6+ permissions :
7+ contents : write
8+ jobs :
9+ changelog :
10+ name : Update CHANGELOG
11+ runs-on : ubuntu-latest
12+ timeout-minutes : 15
13+ if : " !startsWith(github.event.head_commit.message, '[Release]')"
14+ steps :
15+ - uses : actions/checkout@v5
16+ with :
17+ fetch-depth : 0
18+ - uses : jdx/mise-action@v3
19+ with :
20+ experimental : true
21+ - name : Generate CHANGELOG.md
22+ env :
23+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
24+ run : git cliff --config ./cliff.toml -o ./CHANGELOG.md
25+ - name : Check for CHANGELOG changes
26+ id : changelog-changes
27+ run : |
28+ if git diff --quiet CHANGELOG.md; then
29+ echo "No changes in CHANGELOG.md"
30+ echo "has-changes=false" >> $GITHUB_OUTPUT
31+ else
32+ echo "CHANGELOG.md has changes"
33+ echo "has-changes=true" >> $GITHUB_OUTPUT
34+ fi
35+ - name : Commit CHANGELOG
36+ uses : stefanzweifel/git-auto-commit-action@v7
37+ if : steps.changelog-changes.outputs.has-changes == 'true'
38+ with :
39+ commit_message : " docs: update CHANGELOG.md"
40+ file_pattern : CHANGELOG.md
You can’t perform that action at this time.
0 commit comments