-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.57 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
###############################################################################
# Sobre o GitHub Actions #
# https://docs.github.com/en/actions/learn-github-actions #
# https://www.youtube.com/watch?v=TLB5MY9BBa4 #
###############################################################################
#
# Automaticamente atualiza o arquivo changelog sempre que houver um release
#
# Motivação: https://stefanzweifel.io/posts/2021/11/13/introducing-the-changelog-updater-action
# Como usar: https://github.com/stefanzweifel/changelog-updater-action
# Veja: 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