File tree Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Original file line number Diff line number Diff line change 50
50
runs-on : ubuntu-latest
51
51
env :
52
52
GITHUB_TOKEN : ${{ secrets.OR_GITHUB_TOKEN }}
53
+ BRANCH_NAME : npm-version-patch
53
54
steps :
54
55
55
56
# CHECKOUT PROJECT
@@ -91,10 +92,34 @@ jobs:
91
92
npm ci
92
93
npm run build
93
94
94
- # PUSH TAGS IF IT IS A RELEASE
95
- - name : Push tag if release
95
+ # CREATE PR FOR VERSION AND TAG CHANGES
96
+ - name : Create Pull Request
97
+ id : create_pr
96
98
if : inputs.dev == false
97
- run : git push && git push --tags
99
+ uses :
peter-evans/[email protected]
100
+ with :
101
+ token : ${{ env.GITHUB_TOKEN }}
102
+ branch : ${{ env.BRANCH_NAME }}
103
+ title : " Update Version - Automated Changes"
104
+ body : " This is an automated PR created by GitHub Actions"
105
+ base : main
106
+ draft : false
107
+
108
+ # WAIT FOR PR CREATION
109
+ - name : Wait for PR to be created
110
+ id : pr
111
+ if : inputs.dev == false
112
+
113
+ with :
114
+ route : GET /repos/${{ github.repository }}/pulls?head=${{ github.repository_owner }}:${{ env.BRANCH_NAME }}
115
+
116
+ # MERGE PR TO MAIN
117
+ - name : Merge Pull Request
118
+ if : inputs.dev == false
119
+
120
+ with :
121
+ route : PUT /repos/${{ github.repository }}/pulls/${{ steps.create_pr.outputs.pull-request-number }}/merge
122
+ merge_method : squash
98
123
99
124
# PUBLISH NPM PACKAGE
100
125
- name : Publish npm package
You can’t perform that action at this time.
0 commit comments