-
Notifications
You must be signed in to change notification settings - Fork 4
33 lines (31 loc) · 982 Bytes
/
update-changelog.yml
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
name: Update Changelog
on:
workflow_dispatch:
workflow_call:
permissions:
contents: write
jobs:
update_changelog:
if: github.ref_name == github.event.repository.default_branch
runs-on: ubuntu-latest
environment:
name: npm-publish
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
- name: "Install github_changelog_generator"
run: gem install github_changelog_generator
- name: "Generate and commit CHANGELOG.md"
env:
CHANGELOG_GITHUB_TOKEN: ${{ secrets.CHANGELOG_GITHUB_TOKEN }}
run: |
github_changelog_generator
git add CHANGELOG.md
if [ ! -n "$(git status -s)" ]; then
echo "NOTHING TO COMMIT"
else
git config user.name "Alex Vernacchia"
git config user.email "[email protected]"
git commit -m "[skip ci] Update CHANGELOG.md"
git push --no-verify
fi