Skip to content

Commit a593e49

Browse files
committed
ci: add changelog flow.
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
1 parent a98266e commit a593e49

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/changelog.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Changelog
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
changelog:
10+
name: Generate Changelog
11+
runs-on: ubuntu-latest
12+
continue-on-error: true
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
token: ${{ secrets.GH_PAT }}
17+
fetch-depth: 0
18+
19+
- name: Setup go
20+
uses: actions/setup-go@v3
21+
22+
- name: Install gh-chglog
23+
run: go get github.com/git-chglog/git-chglog/cmd/git-chglog@latest
24+
25+
- name: Generate Changelog
26+
run: git-chglog
27+
28+
- name: Commit Changes
29+
run: |
30+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
31+
git config --local user.name "github-actions[bot]"
32+
git commit -m "chore(chglog): update changelog." -a || true
33+
34+
- name: Push Changes
35+
uses: ad-m/github-push-action@0fafdd62b84042d49ec0cb92d9cac7f7ce4ec79e
36+
with:
37+
github_token: ${{ secrets.GH_PAT }}
38+
branch: ${{ github.ref }}

0 commit comments

Comments
 (0)