6
6
description : New release version
7
7
type : string
8
8
required : true
9
+ ref :
10
+ description : Branch/ref to create a release from
11
+ type : string
12
+ required : true
13
+ default : develop
14
+ target_branch :
15
+ description : Target branch to create a release to
16
+ type : string
17
+ required : true
18
+ default : master
9
19
10
20
jobs :
11
21
create-release-pr :
@@ -15,12 +25,12 @@ jobs:
15
25
with :
16
26
fetch-depth : 0
17
27
token : " ${{ secrets.RENKUBOT_GITHUB_TOKEN }}"
18
- ref : ' develop '
28
+ ref : ' ${{ github.event.inputs.ref }} '
19
29
- uses : actions/setup-node@v3
20
30
- name : Create Branch
21
31
run : git checkout -b "release/v${{ github.event.inputs.version }}"
22
- - name : Merge Master
23
- run : git merge origin/master
32
+ - name : Merge Target
33
+ run : git merge " origin/${{ github.event.inputs.target_branch }}"
24
34
- name : Install dependencies
25
35
run : |
26
36
sudo add-apt-repository -y ppa:rmescandon/yq
31
41
id : changelog
32
42
run : |
33
43
echo '{"version": "${{ github.event.inputs.version }}"}' > context.json
34
- conventional-changelog -r 1 -p angular -c context.json | pandoc --from markdown --to rst | sed -e '/=======\n /r /dev/stdin' -e 's/=======\n /=======\n \n/' -i CHANGES.rst
35
- conventional-changelog -r 1 -p angular -c context.json > release_body.md
44
+ conventional-changelog -r 1 -p angular -c context.json | sed -e '1,${s/^# /## /}' | pandoc --from markdown --to rst | sed -e '/=======/r /dev/stdin' -e '0,/=======/ s/=======/=======\n/' -i CHANGES.rst
45
+ conventional-changelog -r 1 -p angular -c context.json | sed -e '1,${s/^# /## /}' > release_body.md
36
46
rm context.json
37
47
- name : Update Chart version
38
48
run : |
55
65
bodyFile : " release_body.md"
56
66
tag : " v${{ github.event.inputs.version }}"
57
67
name : " v${{ github.event.inputs.version }}"
58
- commit : " master "
68
+ commit : " ${{ github.event.inputs.target_branch }} "
59
69
- name : Create Pull Request
60
70
uses : actions/github-script@v6
61
71
with :
67
77
owner,
68
78
repo,
69
79
head: 'release/v${{ github.event.inputs.version }}',
70
- base: 'master ',
80
+ base: '${{ github.event.inputs.target_branch }} ',
71
81
body: [
72
82
'This PR is auto-generated by',
73
83
'[actions/github-script](https://github.com/actions/github-script).'
0 commit comments