Skip to content

Commit 7f578ad

Browse files
committed
chore: added release-drafter GitHub Action workflow
Release Drafter - https://github.com/marketplace/actions/release-drafter
1 parent 90233f4 commit 7f578ad

2 files changed

Lines changed: 69 additions & 0 deletions

File tree

.github/release-drafter.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name-template: 'v$RESOLVED_VERSION 🌈'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
categories:
4+
- title: '🚀 Features'
5+
labels:
6+
- 'feature'
7+
- 'enhancement'
8+
- title: '🐛 Bug Fixes'
9+
labels:
10+
- 'fix'
11+
- 'bugfix'
12+
- 'bug'
13+
- title: '🧰 Maintenance'
14+
label: 'chore'
15+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
16+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
17+
version-resolver:
18+
major:
19+
labels:
20+
- 'major'
21+
minor:
22+
labels:
23+
- 'minor'
24+
patch:
25+
labels:
26+
- 'patch'
27+
default: patch
28+
template: |
29+
## Changes
30+
31+
$CHANGES
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- master
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+
contents: write # for release-drafter/release-drafter to create a github release
23+
pull-requests: write # for release-drafter/release-drafter to add label to PR
24+
runs-on: ubuntu-latest
25+
steps:
26+
# (Optional) GitHub Enterprise requires GHE_HOST variable set
27+
#- name: Set GHE_HOST
28+
# run: |
29+
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
30+
31+
# Drafts your next Release notes as Pull Requests are merged into "master"
32+
- uses: release-drafter/release-drafter@v5
33+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
34+
# with:
35+
# config-name: my-config.yml
36+
# disable-autolabeler: true
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}

0 commit comments

Comments
 (0)