From 194921632fa7e692caf689873a864fdab5918e79 Mon Sep 17 00:00:00 2001 From: Abdelrahman Ashraf Date: Fri, 14 Jun 2024 12:06:45 +0700 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=8E=A1=20fix=20release=20step=20in?= =?UTF-8?q?=20main=20workflow=20(#247)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 86c4e785..79ad45e8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,8 +1,9 @@ name: main - on: + push: + branches: + - 'main' pull_request: - types: [opened, synchronize, reopened, closed, ready_for_review] jobs: validate: @@ -57,13 +58,11 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} - npm-release: - name: npm-release + release: + name: release needs: validate runs-on: ubuntu-latest - if: - github.event_name == 'pull_request' && github.event.pull_request.merged == true && - github.event.pull_request.base.ref == 'main' + if: ${{ github.repository == 'LottieFiles/dotlottie-web' && github.event_name == 'push' }} steps: - name: ⬇️ Checkout repo uses: actions/checkout@v4 @@ -109,26 +108,6 @@ jobs: - name: Remove existing NPM .npmrc run: rm -f "$HOME/.npmrc" - gpr-release: - name: gpr-release - needs: [validate, npm-release] - runs-on: ubuntu-latest - if: > - github.event_name == 'pull_request' && github.event.pull_request.merged == true && - github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.ref == 'changeset-release/main' - steps: - - name: ⬇️ Checkout repo - uses: actions/checkout@v4 - with: - # https://github.com/changesets/action/issues/201#issuecomment-1206088289 - # check out all commits and tags so changeset can skip duplicate tags - fetch-depth: 0 - - - name: ⎔ Setup pnpm@v8 - uses: pnpm/action-setup@v2 - with: - version: 8 - - name: ⎔ Setup Node@v18 for Github Packages uses: actions/setup-node@v4 with: