Update changelog #195
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is synced from rom-rb/template-gem repo | |
name: Changelog | |
on: | |
push: | |
paths: | |
- "changelog.yml" | |
- ".github/workflows/sync_configs.yml" | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
types: [closed] | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
name: Update | |
env: | |
GITHUB_LOGIN: rom-bot | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
steps: | |
- name: Checkout ${{github.repository}} | |
uses: actions/checkout@v2 | |
- name: Checkout devtools | |
uses: actions/checkout@v2 | |
with: | |
repository: rom-rb/devtools | |
path: tmp/devtools | |
- name: Setup git user | |
run: | | |
git config --local user.email "rom-bot@rom-rb.org" | |
git config --local user.name "rom-bot" | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.3" | |
- name: Install dependencies | |
run: gem install ossy --no-document | |
- name: Update changelog.yml from commit | |
run: tmp/devtools/bin/update-changelog-from-commit $GITHUB_SHA | |
- name: Compile CHANGELOG.md | |
run: tmp/devtools/bin/compile-changelog | |
- name: Commit | |
run: | | |
git add -A | |
git commit -m "Update CHANGELOG.md" || echo "nothing to commit" | |
- name: Push changes | |
run: | | |
git pull --rebase origin main | |
git push https://rom-bot:${{secrets.GH_PAT}}@github.com/${{github.repository}}.git HEAD:main |