File tree 1 file changed +37
-1
lines changed
1 file changed +37
-1
lines changed Original file line number Diff line number Diff line change 2
2
name : GitHub - Release
3
3
4
4
on :
5
- push :
5
+ workflow_distach :
6
+ inputs :
7
+ bump :
8
+ type : choice
9
+ description : " The type of version bump to perform"
10
+ options :
11
+ - patch
12
+ - minor
13
+ - major
14
+
6
15
workflow_call :
7
16
inputs :
8
17
version :
@@ -14,8 +23,35 @@ permissions:
14
23
contents : write
15
24
16
25
jobs :
26
+ release-next :
27
+ runs-on : ubuntu-latest
28
+ # If the workflow was triggered by workflow_dispatch
29
+ if : ${{ github.event_name == 'workflow_dispatch' }}
30
+ steps :
31
+ - name : " Checkout"
32
+ uses : actions/checkout@v3
33
+
34
+ - name : " Patch Release Me"
35
+ uses :
42ByteLabs/[email protected]
36
+ with :
37
+ mode : ${{ github.event.inputs.bump }}
38
+
39
+ - name : " Create Release"
40
+ uses : peter-evans/create-pull-request@v6
41
+ with :
42
+ token : ${{ github.token }}
43
+ commit-message : " [chore]: Create release for ${{ github.event.inputs.version }}"
44
+ title : " [chore]: Create release for ${{ github.event.inputs.version }}"
45
+ branch : chore-release-${{ github.event.inputs.version }}
46
+ base : ${{ github.event.before }}
47
+ labels : version
48
+ body : |
49
+ This is an automated PR to create a new release. The release will be created once this PR is merged.
50
+
17
51
release :
18
52
runs-on : ubuntu-latest
53
+ # If the workflow was triggered by a workflow call and the version is not null
54
+ if : ${{ github.event_name == 'workflow_call' && github.event.inputs.version != null }}
19
55
steps :
20
56
# https://github.com/peter-murray/semver-data-action
21
57
- name : Parse SemVer
You can’t perform that action at this time.
0 commit comments