-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (32 loc) · 968 Bytes
/
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
name: Changelog CI
on:
push:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: write
jobs:
generate-changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.PAT_ACCESS }}
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '>=1.19.0'
- name: Install git-chglog
run: go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest
- name: Pull changes
run: git pull origin main --rebase
- name: Generate changelog
run: git-chglog --next-tag 'Unreleased' --output CHANGELOG.md
- name: Commit changelog
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore(changelog): update CHANGELOG.md"
commit_options: '--no-verify --signoff'
file_pattern: CHANGELOG.md
push_options: --force