@@ -56,47 +56,42 @@ jobs:
56
56
if : ${{ fromJSON(github.event.inputs.automatic_mode) == true }}
57
57
run : |
58
58
gh pr merge ${{ steps.create_release_candidate.outputs.created_branch }} \
59
- --delete-branch
59
+ --merge -- delete-branch
60
60
61
- - name : Create tag
62
- if : ${{ fromJSON(github.event.inputs.automatic_mode) == true }}
61
+ - name : Checkout to main
62
+ if : ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
63
+ uses : actions/checkout@v4
64
+ with :
65
+ ref : ${{ env.MAIN_BRANCH }}
66
+
67
+ - name : Create pull request to main
68
+ if : ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
63
69
run : |
64
- git checkout ${{ github.event.inputs.target_branch }}
65
- git tag ${{ steps.create_release_candidate.outputs.version }}
66
- git push origin ${{ steps.create_release_candidate.outputs.version }}
70
+ gh pr create \
71
+ --base ${{ env.MAIN_BRANCH }} \
72
+ --head ${{ github.event.inputs.target_branch }} \
73
+ --title "Release ${{ steps.create_release_candidate.outputs.version}} to ${{ env.MAIN_BRANCH }}" \
74
+ --body "This PR incorporates package(s) version and changelog update."
75
+
76
+ - name : Merge pull request to main
77
+ if : ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
78
+ run : |
79
+ gh pr merge ${{ github.event.inputs.target_branch }} \
80
+ --merge --delete-branch
67
81
68
82
- name : Create prerelease
69
83
if : ${{ fromJSON(github.event.inputs.automatic_mode) == true && fromJSON(github.event.inputs.prerelease) == true}}
70
84
run : |
71
85
gh release create ${{ steps.create_release_candidate.outputs.version }} \
86
+ --target ${{ env.MAIN_BRANCH }} \
72
87
--title ${{ github.event.inputs.release_name }} \
73
- --notes-from-tag \
88
+ --generate-notes \
74
89
--prerelease
75
90
76
91
- name : Create release
77
92
if : ${{ fromJSON(github.event.inputs.automatic_mode) == true && fromJSON(github.event.inputs.prerelease) == false}}
78
93
run : |
79
94
gh release create ${{ steps.create_release_candidate.outputs.version }} \
95
+ --target ${{ env.MAIN_BRANCH }} \
80
96
--title ${{ github.event.inputs.release_name }} \
81
- --notes-from-tag
82
-
83
- - name : Create pull request to main branch
84
- if : ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
85
- run : |
86
- gh pr create \
87
- --base ${{ env.MAIN_BRANCH }} \
88
- --head ${{ github.event.inputs.target_branch }} \
89
- --title "Release ${{ steps.create_release_candidate.outputs.version}} to main" \
90
- --body "This PR incorporates package(s) version and changelog update."
91
-
92
- - name : Checkout to main
93
- if : ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
94
- uses : actions/checkout@v4
95
- with :
96
- ref : ${{ env.MAIN_BRANCH }}
97
-
98
- - name : Merge pull request
99
- if : ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode) == true }}
100
- run : |
101
- gh pr merge ${{ github.event.inputs.target_branch }} \
102
- --delete-branch
97
+ --generate-notes
0 commit comments