Skip to content

Update Changelog

Update Changelog #2

name: Update Changelog
on:
schedule:
# Will run at 01:00 on the 1st and 15th of every month
- cron: "30 1 1,15 * *"
concurrency:
group: update-changelog
cancel-in-progress: true
jobs:
update:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
- uses: actions/cache@v4
with:
path: ${{ env.GEM_HOME }}
key: ${{ runner.os }}
- name: "Update CHANGELOG.md"
env:
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gem install github_changelog_generator
- name: "Commit CHANGELOG.md"
run: |
github_changelog_generator -u skywinder -p ActionSheetPicker-3.0
git add CHANGELOG.md
if [ ! -n "$(git status -s)" ]; then
echo "NOTHING TO COMMIT"
else
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git commit -m "Update CHANGELOG.md"
git push --no-verify
fi