-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.47 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
45
46
47
48
49
50
51
52
53
54
55
56
name: Changelog
on:
workflow_run:
workflows: ['Tag']
types:
- completed
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- 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 }}
# useGitmojis: true
includeInvalidCommits: true
excludeTypes: null
# - name: Create Release
# uses: ncipollo/[email protected]
# with:
# allowUpdates: true
# draft: true
# makeLatest: true
# name: ${{ github.ref_name }}
# body: ${{ steps.changelog.outputs.changes }}
# token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit CHANGELOG.md
uses: stefanzweifel/[email protected]
with:
branch: main
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]'
file_pattern: CHANGELOG.md