Skip to content

Commit 26eec20

Browse files
authored
fix: releases when release label by itself without semver label (#81)
Signed-off-by: jmeridth <[email protected]>
1 parent 8cd8cf1 commit 26eec20

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

.github/workflows/release.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,32 @@ on:
2525
value: ${{ jobs.create_release.outputs.body }}
2626
jobs:
2727
create_release:
28-
# release if
29-
# manual deployment OR
30-
# merged to main and labelled with release labels (breaking, feature, vuln) OR
31-
# merged to main and labelled with release + a semver label (major, minor, OR patch)
28+
# release if:
29+
# Manual deployment (workflow_dispatch) OR
30+
# The pull request was merged AND
31+
# It has at least one of these:
32+
# - reaking
33+
# - feature
34+
# - vuln
35+
# - release (with or without any of major / minor / patch labels)
3236
if: |
3337
(
3438
github.event_name == 'workflow_dispatch') ||
3539
(github.event.pull_request.merged == true &&
36-
(
40+
((
3741
contains(github.event.pull_request.labels.*.name, 'breaking') ||
3842
contains(github.event.pull_request.labels.*.name, 'feature') ||
3943
contains(github.event.pull_request.labels.*.name, 'vuln')
4044
) ||
4145
(
4246
contains(github.event.pull_request.labels.*.name, 'release') &&
47+
!(
48+
contains(github.event.pull_request.labels.*.name, 'major') ||
49+
contains(github.event.pull_request.labels.*.name, 'minor') ||
50+
contains(github.event.pull_request.labels.*.name, 'patch')
51+
)) ||
52+
(
53+
contains(github.event.pull_request.labels.*.name, 'release') &&
4354
contains(github.event.pull_request.labels.*.name, 'major')
4455
) ||
4556
(
@@ -49,7 +60,7 @@ jobs:
4960
(
5061
contains(github.event.pull_request.labels.*.name, 'release') &&
5162
contains(github.event.pull_request.labels.*.name, 'patch')
52-
))
63+
)))
5364
outputs:
5465
full-tag: ${{ steps.release-drafter.outputs.tag_name }}
5566
short-tag: ${{ steps.get_tag_name.outputs.SHORT_TAG }}

0 commit comments

Comments
 (0)