-
-
Notifications
You must be signed in to change notification settings - Fork 95
36 lines (30 loc) · 1.12 KB
/
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
34
35
36
on:
push:
branches: [master]
pull_request:
types: [closed]
branches: [master]
jobs:
update_changelog:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- 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/update_changelog.py "${{ github.event.pull_request.body }}" "Resources/Changelog/ChangelogSunrise.yml"
- name: Commit and Push Changes
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: |
git config --global user.name 'VigersRay'
git config --global user.email '[email protected]'
git add Resources/Changelog/ChangelogSunrise.yml
git commit -m 'Update changelog from PR #${{ github.event.pull_request.number }}'
git push https://VigersRay:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git HEAD:master