Skip to content

Commit 7e9f72f

Browse files
committed
feat(ci): create reusable changelog generation
1 parent 5dfc459 commit 7e9f72f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build and publish latest changelog
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
publish_changelog:
11+
# Force Github action to run only a single job at a time (based on the group name)
12+
# This is to prevent race-condition and inconsistencies with changelog push
13+
concurrency:
14+
group: changelog-build
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository # reusable workflows start clean, so we need to checkout again
18+
uses: actions/checkout@v3
19+
- name: Git client setup and refresh tip
20+
run: |
21+
git config user.name "Release bot"
22+
git config user.email "[email protected]"
23+
git config pull.rebase true
24+
git pull --rebase
25+
- name: "Generate latest changelog"
26+
run: make changelog
27+
- name: Update Changelog in trunk
28+
run: |
29+
git add CHANGELOG.md
30+
git commit -m "chore(ci): update changelog with latest changes"
31+
git push origin HEAD:refs/heads/develop

0 commit comments

Comments
 (0)