Skip to content

Commit 4a1ca4d

Browse files
Revert "Update release.yml (#684)" (#685)
This reverts commit 60b7cc6.
1 parent 405f195 commit 4a1ca4d

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

.github/workflows/release.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Javascript Wrapper Release
32

43
on:
@@ -51,6 +50,7 @@ jobs:
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

0 commit comments

Comments
 (0)