File tree 1 file changed +49
-0
lines changed 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Create release
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ name :
7
+ description : ' Release name'
8
+ required : true
9
+ type : string
10
+
11
+ jobs :
12
+ create-branches :
13
+ runs-on : ubuntu-latest
14
+ env :
15
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
16
+ steps :
17
+ - name : Create base branch
18
+ uses :
peterjgrainger/[email protected]
19
+ with :
20
+ branch : ' ${{ inputs.name }}'
21
+ - name : Create release branch
22
+ uses :
peterjgrainger/[email protected]
23
+ with :
24
+ branch : ' ${{ inputs.name }}.release'
25
+
26
+ create-pull-request :
27
+ runs-on : ubuntu-latest
28
+ steps :
29
+ - uses : actions/checkout@v3
30
+
31
+ - name : Create release configuration template
32
+ run : |
33
+ git config user.name 'Create Release GA'
34
+ git config user.email '[email protected] '
35
+ echo "[release]" > release.cfg
36
+ echo "name = ${{ inputs.name }}" >> release.cfg
37
+ echo "mode = RELEASE" >> release.cfg
38
+ echo "" >> release.cfg
39
+ echo "[modules]" >> release.cfg
40
+ echo "" >> release.cfg
41
+ git add release.cfg
42
+ git commit -a -m 'Create release config'
43
+
44
+ - name : Create Pull Request
45
+ uses : peter-evans/create-pull-request@v4
46
+ with :
47
+ base : ' ${{ inputs.name }}'
48
+ branch : ' ${{ inputs.name }}.release'
49
+ title : ' ${{ inputs.name}} release'
You can’t perform that action at this time.
0 commit comments