|
25 | 25 | value: ${{ jobs.create_release.outputs.body }} |
26 | 26 | jobs: |
27 | 27 | 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) |
32 | 36 | if: | |
33 | 37 | ( |
34 | 38 | github.event_name == 'workflow_dispatch') || |
35 | 39 | (github.event.pull_request.merged == true && |
36 | | - ( |
| 40 | + (( |
37 | 41 | contains(github.event.pull_request.labels.*.name, 'breaking') || |
38 | 42 | contains(github.event.pull_request.labels.*.name, 'feature') || |
39 | 43 | contains(github.event.pull_request.labels.*.name, 'vuln') |
40 | 44 | ) || |
41 | 45 | ( |
42 | 46 | 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') && |
43 | 54 | contains(github.event.pull_request.labels.*.name, 'major') |
44 | 55 | ) || |
45 | 56 | ( |
|
49 | 60 | ( |
50 | 61 | contains(github.event.pull_request.labels.*.name, 'release') && |
51 | 62 | contains(github.event.pull_request.labels.*.name, 'patch') |
52 | | - )) |
| 63 | + ))) |
53 | 64 | outputs: |
54 | 65 | full-tag: ${{ steps.release-drafter.outputs.tag_name }} |
55 | 66 | short-tag: ${{ steps.get_tag_name.outputs.SHORT_TAG }} |
|
0 commit comments