-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.23 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: 'Update Changelog'
on:
pull_request:
types: [closed]
release:
types: [published]
permissions:
contents: write
jobs:
update-changelog:
if: github.event.pull_request.merged == true || github.event_name == 'release'
name: 'Update Changelog'
runs-on: ubuntu-latest
steps:
- name: 'Generate Token'
uses: actions/create-github-app-token@v1
id: token-generator
with:
app-id: ${{ secrets.TOKEN_GENERATOR_APP_ID }}
private-key: ${{ secrets.TOKEN_GENERATOR_PRIVATE_KEY }}
- name: 'Checkout Branch'
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
token: ${{ steps.token-generator.outputs.token }}
- name: 'Initialize Environment'
uses: ./.github/actions/initialize-environment
- name: 'Generate Changelog'
run: |
make generate_changelog
- name: 'Push Changes'
if: success()
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'Update Changelog (!automated)'
branch: master
- name: 'Retag Release'
if: github.event_name == 'release' && success()
uses: EndBug/latest-tag@latest
with:
ref: ${{ github.event.release.tag_name }}