-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.56 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
###############################################################################
# About GitHub Actions #
# https://docs.github.com/en/actions/learn-github-actions #
# https://www.youtube.com/watch?v=TLB5MY9BBa4 #
###############################################################################
#
# Automatically updates the changelog file whenever there is a release
#
# Motivation: https://stefanzweifel.io/posts/2021/11/13/introducing-the-changelog-updater-action
# How to use: https://github.com/stefanzweifel/changelog-updater-action
# See: https://docs.github.com/pt/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow
name: Update Changelog
on:
workflow_call:
release:
types: [released]
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ github.event.release.tag_name }}
release-notes: ${{ github.event.release.body }}
path-to-changelog: docs/CHANGELOG.md
compare-url-target-revision: ${{ github.event.release.target_commitish }}
- name: Auto Commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: ${{ github.event.release.target_commitish }}
commit_message: 'docs: update changelog.md'
file_pattern: docs/CHANGELOG.md