66 description : New release version
77 type : string
88 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
919
1020jobs :
1121 create-release-pr :
@@ -15,12 +25,12 @@ jobs:
1525 with :
1626 fetch-depth : 0
1727 token : " ${{ secrets.RENKUBOT_GITHUB_TOKEN }}"
18- ref : ' develop '
28+ ref : ' ${{ github.event.inputs.ref }} '
1929 - uses : actions/setup-node@v3
2030 - name : Create Branch
2131 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 }}"
2434 - name : Install dependencies
2535 run : |
2636 sudo add-apt-repository -y ppa:rmescandon/yq
3141 id : changelog
3242 run : |
3343 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
3646 rm context.json
3747 - name : Update Chart version
3848 run : |
5565 bodyFile : " release_body.md"
5666 tag : " v${{ github.event.inputs.version }}"
5767 name : " v${{ github.event.inputs.version }}"
58- commit : " master "
68+ commit : " ${{ github.event.inputs.target_branch }} "
5969 - name : Create Pull Request
6070 uses : actions/github-script@v6
6171 with :
6777 owner,
6878 repo,
6979 head: 'release/v${{ github.event.inputs.version }}',
70- base: 'master ',
80+ base: '${{ github.event.inputs.target_branch }} ',
7181 body: [
7282 'This PR is auto-generated by',
7383 '[actions/github-script](https://github.com/actions/github-script).'
0 commit comments