Skip to content

Commit 811e445

Browse files
ci: generate changelogs with actions
1 parent 50802eb commit 811e445

File tree

3 files changed

+87
-1
lines changed

3 files changed

+87
-1
lines changed

.github/changelog_config.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"categories": [
3+
{
4+
"title": "## 🚀 Features",
5+
"labels": [
6+
"feature",
7+
"feat"
8+
]
9+
},
10+
{
11+
"title": "## 🐛 Bug Fixes",
12+
"labels": [
13+
"fix",
14+
"bug"
15+
]
16+
},
17+
{
18+
"title": "## 🧪 Tests",
19+
"labels": [
20+
"test"
21+
]
22+
},
23+
{
24+
"title": "## ⚙️ CI/CD",
25+
"labels": [
26+
"ci"
27+
]
28+
},
29+
{
30+
"title": "## 📖 Documentation",
31+
"labels": [
32+
"docs"
33+
]
34+
},
35+
{
36+
"title": "## ♻️ Refactoring",
37+
"labels": [
38+
"refactor"
39+
]
40+
},
41+
{
42+
"title": "## 🧹 Chore",
43+
"labels": [
44+
"chore"
45+
]
46+
},
47+
{
48+
"title": "## 🎨 Style",
49+
"labels": [
50+
"style"
51+
]
52+
}
53+
],
54+
"ignore_labels": [
55+
"ignore"
56+
],
57+
"template": "${{CHANGELOG}}\n\n<details>\n<summary><b>Full List of Changes</b></summary>\n\n${{UNCATEGORIZED}}\n</details>",
58+
"pr_template": "- ${{TITLE}} #${{NUMBER}}",
59+
"empty_summary_template": "No significant changes.",
60+
"label_extractor": [
61+
{
62+
"pattern": "^(feat|feature|fix|bug|test|ci|build|docs|perf|refactor|chore|style)(\\(.+\\))?:",
63+
"target": "$1",
64+
"flags": "i"
65+
}
66+
]
67+
}

.github/workflows/build.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,19 @@ jobs:
268268
# List files to verify
269269
ls -l release_assets/
270270
271+
- name: Build Changelog
272+
id: build_changelog
273+
uses: mikepenz/release-changelog-builder-action@v5
274+
with:
275+
configuration: ".github/changelog_config.json"
276+
env:
277+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
278+
271279
- name: Create Release
272280
uses: softprops/action-gh-release@v2
273281
with:
282+
body: ${{ steps.build_changelog.outputs.changelog }}
274283
files: release_assets/*
275-
generate_release_notes: true
284+
generate_release_notes: false
276285
env:
277286
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/debug-release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,20 @@ jobs:
5959
echo "Files prepared:"
6060
ls -l release_assets/
6161
62+
- name: Build Changelog
63+
id: build_changelog
64+
uses: mikepenz/release-changelog-builder-action@v5
65+
with:
66+
configuration: ".github/changelog_config.json"
67+
toTag: ${{ inputs.version }}
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
6271
- name: Create Test Release
6372
uses: softprops/action-gh-release@v2
6473
with:
6574
tag_name: ${{ inputs.version }}
75+
body: ${{ steps.build_changelog.outputs.changelog }}
6676
files: release_assets/*
6777
draft: true
6878
prerelease: true

0 commit comments

Comments
 (0)