Skip to content

Commit 4039499

Browse files
committed
ci: add step to commit and push generated changelog.
1 parent d6559d2 commit 4039499

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,19 @@ jobs:
9292
# It appends to CHANGELOG.md in the runner.
9393
run: python3 scripts/generate_changelog.py
9494

95+
- name: Commit and Push Changelog
96+
run: |
97+
git config --global user.name "github-actions[bot]"
98+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
99+
git add CHANGELOG.md
100+
# Only commit if there are changes
101+
if git diff --staged --quiet; then
102+
echo "No changes to commit."
103+
else
104+
git commit -m "docs: update changelog [skip ci]"
105+
git push
106+
fi
107+
95108
- name: Upload Changelog Artifact
96109
uses: actions/upload-artifact@v4
97110
with:

0 commit comments

Comments
 (0)