From 3d7feb0cf5e8ad33aaa22735443b39960e32775d Mon Sep 17 00:00:00 2001 From: cmarin001 Date: Tue, 30 Apr 2024 17:32:51 -0500 Subject: [PATCH] fix: update workflow in order to avoid merges with failed builds --- .github/workflows/auto-release.yml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 8a3847e..966b8f5 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -4,12 +4,38 @@ on: push: branches: - main + pull_request: + branches: + - main jobs: - autorelease: + build: runs-on: ubuntu-latest - if: ${{ !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci') }} + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + with: + token: ${{ secrets.GH_TOKEN }} + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "20" + registry-url: "https://registry.npmjs.org/" + scope: "@inubekit" + always-auth: true + + - name: Install Dependencies + run: npm install + + - name: Build Project + run: npm run build + + autorelease: + runs-on: ubuntu-latest + needs: build + if: ${{ github.event_name == 'push' && !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci') }} steps: - name: Checkout Repository uses: actions/checkout@v3