Skip to content

Commit d8f0c97

Browse files
committed
ci: 添加 Release Drafter
1 parent 62190a3 commit d8f0c97

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

.github/release-drafter.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
template: $CHANGES
2+
name-template: "v$RESOLVED_VERSION"
3+
tag-template: "v$RESOLVED_VERSION"
4+
exclude-labels:
5+
- "dependencies"
6+
- "skip-changelog"
7+
autolabeler:
8+
- label: "bug"
9+
branch:
10+
- '/fix\/.+/'
11+
- label: "change"
12+
branch:
13+
- '/change\/.+/'
14+
- label: "enhancement"
15+
branch:
16+
- '/feature\/.+/'
17+
- '/feat\/.+/'
18+
- '/improve\/.+/'
19+
- label: "ci"
20+
files:
21+
- .github/**/*
22+
- label: "breaking-change"
23+
title:
24+
- "/.+!:.+/"
25+
categories:
26+
- title: 💥 破坏性变更
27+
labels:
28+
- breaking-change
29+
- title: 🚀 新功能
30+
labels:
31+
- enhancement
32+
- title: 🐛 Bug 修复
33+
labels:
34+
- bug
35+
- title: 💫 杂项
36+
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
37+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
38+
version-resolver:
39+
major:
40+
labels:
41+
- "major"
42+
minor:
43+
labels:
44+
- "minor"
45+
patch:
46+
labels:
47+
- "patch"
48+
default: patch
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, reopened, synchronize]
9+
10+
jobs:
11+
update_release_draft:
12+
name: Update Release Draft
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: release-drafter/release-drafter@v5
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)