From de0c7a06a640c0659965b2560e3dfb558eba9fb2 Mon Sep 17 00:00:00 2001 From: Daniel Lazar Date: Sun, 16 Jun 2024 14:21:23 +0200 Subject: [PATCH] ci(workflows): make sure needs are met --- .github/workflows/tests-and-release.yml | 24 ++++++++++++++++++++++-- .github/workflows/tests.yml | 2 +- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests-and-release.yml b/.github/workflows/tests-and-release.yml index f98ca83..89849e5 100644 --- a/.github/workflows/tests-and-release.yml +++ b/.github/workflows/tests-and-release.yml @@ -1,12 +1,13 @@ # On master pushes it runs the rule tests and if needed it publishes to NPM (new package.json version). -name: Tests & Release +name: Master Workflow on: push: branches: master jobs: - publish: + checks: + name: Checks runs-on: ubuntu-latest steps: - name: Checkout code @@ -29,6 +30,25 @@ jobs: - name: Rule tests run: yarn test + release: + name: Release + needs: checks + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 20.x + + - name: Install dependencies + run: yarn + + - name: Build + run: yarn build + - name: Publish uses: JS-DevTools/npm-publish@v3 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 25a1733..28c2914 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,6 @@ # Runs rule tests on PRs targeting the master. -name: Tests +name: PR Workflow on: pull_request: branches: master