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 5050 runs-on : ubuntu-latest
5151 env :
5252 GITHUB_TOKEN : ${{ secrets.OR_GITHUB_TOKEN }}
53+ BRANCH_NAME : npm-version-patch
5354 steps :
5455
5556 # CHECKOUT PROJECT
@@ -91,10 +92,34 @@ jobs:
9192 npm ci
9293 npm run build
9394
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
9698 if : inputs.dev == false
97- run : git push && git push --tags
99+ uses : peter-evans/create-pull-request@v6.0.5
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+ uses : octokit/request-action@v2.3.1
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+ uses : octokit/request-action@v2.3.1
120+ with :
121+ route : PUT /repos/${{ github.repository }}/pulls/${{ steps.create_pr.outputs.pull-request-number }}/merge
122+ merge_method : squash
98123
99124 # PUBLISH NPM PACKAGE
100125 - name : Publish npm package
You can’t perform that action at this time.
0 commit comments