Repository navigation
48 lines (44 loc) · 1.67 KB
/
Copy pathrelease-management-github.yml
File metadata and controls
48 lines (44 loc) · 1.67 KB
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
name: Release | Github Release Drafter
on:
push:
branches:
- master
# Only for the autolabeler
pull_request:
# edited: so a title change relabels the PR. Not on labeled/unlabeled: label changes can't change
# what the title matches, and rerunning there would only fight the maintainer's edits.
types: [opened, reopened, synchronize, edited]
permissions:
contents: read
jobs:
# Updates the draft of the next release with what was merged to master
update_release_draft:
if: github.event_name == 'push'
# One update at a time, so concurrent pushes never create duplicate drafts
concurrency:
group: release-drafter-draft
cancel-in-progress: false
permissions:
# To create and update the draft release
contents: write
# To read the labels of the merged PRs
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@978bb0b30c5ee8cdd332ced253758157150d43f0 # v7.10.0
# Labels the PR from its title (see autolabeler in .github/release-drafter.yml). Since v7 the
# autolabeler is its own action and never touches the drafts (concurrent PR events used to create
# duplicate drafts targeting the PR branch).
autolabel:
if: github.event_name == 'pull_request'
# Only the latest event of a PR matters
concurrency:
group: release-drafter-autolabel-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
# To add labels to the PR
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter/autolabeler@978bb0b30c5ee8cdd332ced253758157150d43f0 # v7.10.0