Skip to content

Commit 1ac70ea

Browse files
committed
ci: add Release Drafter workflow
1 parent 4ba990e commit 1ac70ea

File tree

2 files changed

+198
-0
lines changed

2 files changed

+198
-0
lines changed

.github/release-drafter.yml

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
name-template: 'v$RESOLVED_VERSION'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
4+
template: |
5+
# What's Changed
6+
7+
$CHANGES
8+
9+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
10+
11+
autolabeler:
12+
- label: 'breaking'
13+
body:
14+
- '/BREAKING CHANGE: .+/i'
15+
title:
16+
- '/!:/'
17+
18+
- label: 'bug'
19+
branch:
20+
- '/fix\/.+/'
21+
title:
22+
- '/fix: .+/'
23+
24+
- label: 'build'
25+
files:
26+
- '*.cmake'
27+
- '**/cmake/**'
28+
- 'CMakeLists.txt'
29+
- 'CMakePresets.json'
30+
branch:
31+
- '/build\/.+/'
32+
title:
33+
- '/build: .+/'
34+
35+
- label: 'chore'
36+
files:
37+
- '.clang-tidy'
38+
- '.cppcheck_suppressions'
39+
- '.gitattributes'
40+
- '.gitignore'
41+
- '*.rc.in'
42+
- 'LICENSE'
43+
branch:
44+
- '/chore\/.+/'
45+
title:
46+
- '/chore: .+/'
47+
48+
- label: 'ci'
49+
files:
50+
- '.github/**'
51+
branch:
52+
- '/ci\/.+/'
53+
title:
54+
- '/ci: .+/'
55+
56+
- label: 'documentation'
57+
files:
58+
- '*.md'
59+
- '*.rst'
60+
- 'docs/**'
61+
branch:
62+
- '/docs\/.+/'
63+
title:
64+
- '/docs: .+/'
65+
66+
- label: 'enhancement'
67+
branch:
68+
- '/feat\/.+/'
69+
title:
70+
- '/feat: .+/'
71+
72+
- label: 'improvement'
73+
branch:
74+
- '/improvement\/.+/'
75+
title:
76+
- '/improvement: .+/'
77+
78+
- label: 'performance'
79+
branch:
80+
- '/perf\/.+/'
81+
title:
82+
- '/perf: .+/'
83+
84+
- label: 'refactoring'
85+
branch:
86+
- '/refactor\/.+/'
87+
title:
88+
- '/refactor: .+/'
89+
90+
- label: 'revert'
91+
branch:
92+
- '/revert\/.+/'
93+
title:
94+
- '/revert: .+/'
95+
96+
- label: 'style'
97+
files:
98+
- '.clang-format'
99+
- '.editorconfig'
100+
branch:
101+
- '/style\/.+/'
102+
title:
103+
- '/style: .+/'
104+
105+
- label: 'tests'
106+
files:
107+
- '**/test/**'
108+
branch:
109+
- '/test\/.+/'
110+
title:
111+
- '/test: .+/'
112+
113+
categories:
114+
- title: ':warning: Breaking changes'
115+
labels:
116+
- 'breaking'
117+
118+
- title: ':rocket: Features'
119+
labels:
120+
- 'enhancement'
121+
122+
- title: ':thumbsup: Improvements'
123+
labels:
124+
- 'improvement'
125+
- 'performance'
126+
- 'refactoring'
127+
128+
- title: ':bug: Bug Fixes'
129+
labels:
130+
- 'bug'
131+
132+
# - title: ':books: Documentation'
133+
# labels:
134+
# - 'documentation'
135+
136+
- title: ':white_check_mark: Tests'
137+
labels:
138+
- 'tests'
139+
140+
- title: ':hammer: Maintenance'
141+
labels:
142+
- 'build'
143+
- 'chore'
144+
- 'ci'
145+
- 'revert'
146+
- 'style'
147+
148+
version-resolver:
149+
major:
150+
labels:
151+
- 'breaking'
152+
153+
minor:
154+
labels:
155+
- 'enhancement'
156+
157+
patch:
158+
labels:
159+
- 'bug'
160+
- 'improvement'
161+
- 'performance'
162+
- 'refactoring'
163+
164+
exclude-labels:
165+
- 'skip-changelog'

.github/workflows/release-drafter.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
pull_request:
8+
types: ["opened", "reopened", "synchronize"]
9+
10+
pull_request_target:
11+
types: ["opened", "reopened", "synchronize"]
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
update_release_draft:
18+
permissions:
19+
contents: write
20+
pull-requests: write
21+
22+
runs-on: "ubuntu-latest"
23+
24+
steps:
25+
- uses: release-drafter/release-drafter@v5
26+
with:
27+
config-name: "release-drafter.yml"
28+
publish: false
29+
prerelease: false
30+
disable-releaser: false
31+
disable-autolabeler: false
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)