File tree Expand file tree Collapse file tree 1 file changed +32
-4
lines changed Expand file tree Collapse file tree 1 file changed +32
-4
lines changed Original file line number Diff line number Diff line change 1-
21name : Javascript Wrapper Release
32
43on :
5150 runs-on : ubuntu-latest
5251 env :
5352 GITHUB_TOKEN : ${{ secrets.OR_GITHUB_TOKEN }}
53+ BRANCH_NAME : npm-version-patch
5454 steps :
5555
5656 # CHECKOUT PROJECT
@@ -91,11 +91,39 @@ jobs:
9191 run : |
9292 npm ci
9393 npm run build
94+
95+ # # PUSH TAG
96+ # - name: Push tag
97+ # run: git push --tags
98+
99+ # CREATE PR FOR VERSION AND TAG CHANGES
100+ - name : Create Pull Request
101+ id : create_pr
102+ if : inputs.dev == false
103+ uses : peter-evans/create-pull-request@v6.0.5
104+ with :
105+ token : ${{ env.GITHUB_TOKEN }}
106+ branch : ${{ env.BRANCH_NAME }}
107+ title : " Update Version - Automated Changes"
108+ body : " This is an automated PR created by GitHub Actions"
109+ base : main
110+ draft : false
111+
112+ # WAIT FOR PR CREATION
113+ - name : Wait for PR to be created
114+ id : pr
115+ if : inputs.dev == false
116+ uses : octokit/request-action@v2.3.1
117+ with :
118+ route : GET /repos/${{ github.repository }}/pulls?head=${{ github.repository_owner }}:${{ env.BRANCH_NAME }}
94119
95- # PUSH TAGS IF IT IS A RELEASE
96- - name : Push tag if release
120+ # MERGE PR TO MAIN
121+ - name : Merge Pull Request
97122 if : inputs.dev == false
98- run : git push && git push --tags
123+ uses : octokit/request-action@v2.3.1
124+ with :
125+ route : PUT /repos/${{ github.repository }}/pulls/${{ steps.create_pr.outputs.pull-request-number }}/merge
126+ merge_method : squash
99127
100128 # PUBLISH NPM PACKAGE
101129 - name : Publish npm package
You can’t perform that action at this time.
0 commit comments