From 91d8b81d2f27f525a66c3adf4d8955e827a38209 Mon Sep 17 00:00:00 2001 From: Tiago Baptista <92083272+tiagobcx@users.noreply.github.com> Date: Thu, 20 Jun 2024 10:05:45 +0100 Subject: [PATCH] Revert "Revert "Update release.yml (#684)" (#685)" This reverts commit 4a1ca4d4ede8ac6fa36425fdb7bb5074aaa321f0. --- .github/workflows/release.yml | 36 ++++------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6c03f943..9bde73e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,4 @@ + name: Javascript Wrapper Release on: @@ -50,7 +51,6 @@ jobs: runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.OR_GITHUB_TOKEN }} - BRANCH_NAME: npm-version-patch steps: # CHECKOUT PROJECT @@ -91,39 +91,11 @@ jobs: run: | npm ci npm run build - - # # PUSH TAG - # - name: Push tag - # run: git push --tags - - # CREATE PR FOR VERSION AND TAG CHANGES - - name: Create Pull Request - id: create_pr - if: inputs.dev == false - uses: peter-evans/create-pull-request@v6.0.5 - with: - token: ${{ env.GITHUB_TOKEN }} - branch: ${{ env.BRANCH_NAME }} - title: "Update Version - Automated Changes" - body: "This is an automated PR created by GitHub Actions" - base: main - draft: false - - # WAIT FOR PR CREATION - - name: Wait for PR to be created - id: pr - if: inputs.dev == false - uses: octokit/request-action@v2.3.1 - with: - route: GET /repos/${{ github.repository }}/pulls?head=${{ github.repository_owner }}:${{ env.BRANCH_NAME }} - # MERGE PR TO MAIN - - name: Merge Pull Request + # PUSH TAGS IF IT IS A RELEASE + - name: Push tag if release if: inputs.dev == false - uses: octokit/request-action@v2.3.1 - with: - route: PUT /repos/${{ github.repository }}/pulls/${{ steps.create_pr.outputs.pull-request-number }}/merge - merge_method: squash + run: git push && git push --tags # PUBLISH NPM PACKAGE - name: Publish npm package