Skip to content

Commit ac664c3

Browse files
committed
Add: use release-drafter.
1 parent 8e8e931 commit ac664c3

File tree

2 files changed

+98
-0
lines changed

2 files changed

+98
-0
lines changed

.github/release-drafter.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name-template: "v$RESOLVED_VERSION 🌈"
2+
tag-template: "v$RESOLVED_VERSION"
3+
4+
categories:
5+
- title: "🚀 Features"
6+
labels:
7+
- "enhancement"
8+
- title: "🐛 Bug Fixes"
9+
labels:
10+
- "bug"
11+
- "emergency"
12+
- title: "🔧 Refactoring"
13+
label: "refactor"
14+
- title: "📖 Documentation"
15+
label: "documentation"
16+
- title: "✅ Tests"
17+
label: "test"
18+
19+
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
20+
21+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
22+
23+
version-resolver:
24+
major:
25+
labels:
26+
- "major"
27+
minor:
28+
labels:
29+
- "minor"
30+
patch:
31+
labels:
32+
- "patch"
33+
default: patch
34+
35+
template: |
36+
## Changes
37+
$CHANGES
38+
39+
autolabeler:
40+
- label: enhancement
41+
branch:
42+
- "/^feat(ure)?[/-].+/"
43+
- label: bug
44+
branch:
45+
- "/^fix[/-].+/"
46+
- label: emergency
47+
branch:
48+
- "/^hotfix[/-].+/"
49+
- label: test
50+
branch:
51+
- "/^test[/-].+/"
52+
- label: refactor
53+
branch:
54+
- "/^refactor[/-].+/"
55+
- label: documentation
56+
branch:
57+
- "/^doc[/-].+/"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- main
8+
# pull_request event is required only for autolabeler
9+
pull_request:
10+
# Only following types are handled by the action, but one can default to all as well
11+
types: [opened, reopened, synchronize]
12+
# pull_request_target event is required for autolabeler to support PRs from forks
13+
# pull_request_target:
14+
# types: [opened, reopened, synchronize]
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
update_release_draft:
21+
permissions:
22+
# write permission is required to create a github release
23+
contents: write
24+
# write permission is required for autolabeler
25+
# otherwise, read permission is required at least
26+
pull-requests: write
27+
runs-on: ubuntu-latest
28+
steps:
29+
# (Optional) GitHub Enterprise requires GHE_HOST variable set
30+
#- name: Set GHE_HOST
31+
# run: |
32+
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
33+
34+
# Drafts your next Release notes as Pull Requests are merged into "master"
35+
- uses: release-drafter/release-drafter@v5
36+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
37+
# with:
38+
# config-name: my-config.yml
39+
# disable-autolabeler: true
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)