Skip to content

Commit ebf2000

Browse files
authored
ci: Update workflows for release drafter v7 (#30)
1 parent 8e2216f commit ebf2000

File tree

2 files changed

+27
-12
lines changed

2 files changed

+27
-12
lines changed

.github/workflows/chore.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ on:
33
pull_request_target: # zizmor: ignore[dangerous-triggers] no PR code executed
44
branches: [main]
55
types: [opened, reopened, edited, synchronize]
6-
push:
7-
branches: [main]
86

97
concurrency:
108
group: ${{ github.workflow }}-${{ github.ref }}
@@ -13,7 +11,6 @@ concurrency:
1311
jobs:
1412
check-pr-title:
1513
name: Check PR Title
16-
if: github.event_name == 'pull_request_target'
1714
runs-on: ubuntu-latest
1815
permissions:
1916
contents: read
@@ -52,17 +49,14 @@ jobs:
5249
header: conventional-commit-pr-title
5350
delete: true
5451

55-
release-drafter:
56-
name: ${{ github.event_name == 'pull_request_target' && 'Assign Labels' || 'Draft Release' }}
52+
assign-labels:
53+
name: Assign Labels
5754
runs-on: ubuntu-latest
5855
permissions:
59-
contents: write
56+
contents: read
6057
pull-requests: write
6158
steps:
62-
- name: ${{ github.event_name == 'pull_request_target' && 'Assign labels' || 'Update release draft' }}
63-
uses: release-drafter/release-drafter@139054aeaa9adc52ab36ddf67437541f039b88e2 # v7.1.1
59+
- name: Assign labels
60+
uses: release-drafter/release-drafter/autolabeler@139054aeaa9adc52ab36ddf67437541f039b88e2 # v7.1.1
6461
with:
65-
disable-releaser: ${{ github.event_name == 'pull_request_target' }}
66-
disable-autolabeler: ${{ github.event_name == 'push' }}
67-
env:
68-
GITHUB_TOKEN: ${{ github.token }}
62+
token: ${{ github.token }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release Drafter
2+
on:
3+
push:
4+
branches: [main]
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
draft-release:
12+
name: Draft Release
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
steps:
18+
- name: Update release draft
19+
uses: release-drafter/release-drafter@139054aeaa9adc52ab36ddf67437541f039b88e2 # v7.1.1
20+
with:
21+
token: ${{ github.token }}

0 commit comments

Comments
 (0)