-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.51 KB
/
release-drafter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Release
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, labeled, unlabeled, synchronize]
permissions:
contents: read
jobs:
update_release:
name: Prepare
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
check_labels:
name: Validate Labels
runs-on: ubuntu-latest
needs: update_release
if: ${{ github.event_name == 'pull_request' }}
permissions:
issues: write
pull-requests: write
steps:
- uses: mheap/github-action-required-labels@v5
if: ${{ always() }}
with:
mode: exactly
count: 1
labels: "bump-patch, bump-minor, bump-major, skip-changelog"
add_comment: true
message: |
This PR needs **{{ errorString }}** one label added to indicate whether it is a major, minor, or patch change.
The available labels are: `bump-patch`, `bump-minor`, `bump-major` and `skip-changelog`.
- uses: mheap/github-action-required-labels@v5
if: ${{ always() }}
with:
mode: exactly
count: 1
labels: "feature, chore, bug"
add_comment: true
message: |
This PR needs **{{ errorString }}** one label added to indicate whether it is a feature, bug, or chore.
The available labels are: `feature`, `chore`, `bug`.