Test changelog #88
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
name: Update sunrise changelog | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
types: [closed] | |
branches: [master] | |
jobs: | |
update_changelog: | |
if: github.event.pull_request.merged == true && github.event.commits[0].author.name != 'GitHubActions' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Configure git | |
run: | | |
git config user.name "GitHubActions" | |
git config user.email "<>" | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install Dependencies | |
run: pip install pyyaml | |
- name: Extract Changelog from PR | |
run: python3 Tools/automatic_changelog.py "Resources/Changelog/ChangelogSunrise.yml" "${{ github.event.pull_request.body }}" | |
- name: Commit and Push Changes | |
run: | | |
git add Resources/Changelog/ChangelogSunrise.yml | |
git commit -m 'Update changelog from PR #${{ github.event.pull_request.number }}' | |
git push |