-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (41 loc) · 1.18 KB
/
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
name: changelog
on:
push:
branches:
- ci
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: Get previous tag
id: previousTag
run: |
name=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | tail -2 | head -1)
echo "previousTag: $name"
echo "previousTag=$name" >> $GITHUB_ENV
- name: Update CHANGELOG
id: changelog
uses: requarks/[email protected]
with:
token: ${{ github.token }}
fromTag: ${{ github.ref_name }}
toTag: ${{ env.previousTag }}
writeToFile: true
excludeTypes: build,other,style
- name: Commit changelog
uses: EndBug/add-and-commit@v9
with:
add: CHANGELOG.md
default_author: github_actions
fetch: true
pathspec_error_handling: exitAtEnd
push: true
message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]'