Skip to content

Update Changelog

Update Changelog #20

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