From ca951be57fcc11238eb7410b750759e3573284b0 Mon Sep 17 00:00:00 2001 From: johelder Date: Sun, 15 Jun 2025 21:08:15 -0300 Subject: [PATCH 1/2] ci: update workflow triggers and remove deploy job - add dev branch to push and pull_request triggers - remove deploy job and related steps --- .github/workflows/ci.yml | 36 +++++--------------------------- .github/workflows/deploy.yml | 40 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c864f1..ee46386 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,11 @@ on: push: branches: - main + - dev + pull_request: + branches: + - main + - dev merge_group: types: - checks_requested @@ -46,34 +51,3 @@ jobs: - name: Build package run: yarn prepare - - deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ github.head_ref || github.ref_name }} - - - name: Setup - uses: ./.github/actions/setup - - - name: Initialize Git user - run: | - git config --global user.name "Release Workflow" - git config --global user.email "${{ secrets.GIT_EMAIL }}" - - - name: Authenticate GitHub Actions - run: git remote set-url origin https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} - - - name: Initialize the NPM config - run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Deploy package to NPM - run: yarn release --ci - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..a69cf55 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,40 @@ +name: DEPLOY +on: + push: + branches: + - main + merge_group: + types: + - checks_requested + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.head_ref || github.ref_name }} + + - name: Setup + uses: ./.github/actions/setup + + - name: Initialize Git user + run: | + git config --global user.name "Release Workflow" + git config --global user.email "${{ secrets.GIT_EMAIL }}" + + - name: Authenticate GitHub Actions + run: git remote set-url origin https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} + + - name: Initialize the NPM config + run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Deploy package to NPM + run: yarn release --ci + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} From f1c3995af261afc2c57554c4df4f62a56c5e5576 Mon Sep 17 00:00:00 2001 From: johelder Date: Sun, 15 Jun 2025 21:10:00 -0300 Subject: [PATCH 2/2] ci: remove push trigger from CI workflow - remove push trigger for main and dev branches - keep pull request trigger for main branch --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee46386..30f96ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,5 @@ name: CI on: - push: - branches: - - main - - dev pull_request: branches: - main