From e1beffbc3d0b098879b28610beeb86bbc7872f03 Mon Sep 17 00:00:00 2001 From: Ryan De La Torre Date: Sat, 9 Mar 2024 11:25:08 -0800 Subject: [PATCH] test --- .../do-not-merge-to-next.yml | 0 .github/workflows/{cron-1.yml => cron.yml} | 40 +++++-------------- 2 files changed, 9 insertions(+), 31 deletions(-) rename .github/{workflows => workflows-DISABLED}/do-not-merge-to-next.yml (100%) rename .github/workflows/{cron-1.yml => cron.yml} (53%) diff --git a/.github/workflows/do-not-merge-to-next.yml b/.github/workflows-DISABLED/do-not-merge-to-next.yml similarity index 100% rename from .github/workflows/do-not-merge-to-next.yml rename to .github/workflows-DISABLED/do-not-merge-to-next.yml diff --git a/.github/workflows/cron-1.yml b/.github/workflows/cron.yml similarity index 53% rename from .github/workflows/cron-1.yml rename to .github/workflows/cron.yml index 9b0556c..b1aa995 100644 --- a/.github/workflows/cron-1.yml +++ b/.github/workflows/cron.yml @@ -1,4 +1,4 @@ -name: Cron (1) +name: Cron on: schedule: @@ -6,58 +6,36 @@ on: - cron: "30 21 * * 1-5" # Allows you to run this workflow manually from the Actions tab workflow_dispatch: - inputs: - mode: - description: "Publish mode" - required: true - default: "preview" - type: choice - options: - - preview - - publish - - force-version - version: - type: string - description: "Force version number" - dist-tag: - type: string - description: "Force version tag" - default: "latest" jobs: - check-inputs: - name: Check inputs - if: ${{ !github.event.schedule }} + check-version: + name: Check version runs-on: ubuntu-latest steps: - - if: ${{ github.event.inputs.mode != 'force-version' && github.event.inputs.version != '' }} + - if: ${{ github.event.schedule && github.event.inputs.mode != 'force-version' && github.event.inputs.version != '' }} run: | echo "::error::Please choose version mode when forcing a version number" exit 1 - - if: ${{ github.event.inputs.mode == 'force-version' && github.event.inputs.version == '' }} + - if: ${{ github.event.schedule && github.event.inputs.mode == 'force-version' && github.event.inputs.version == '' }} run: | echo "::error::Please enter a version number when forcing a specific publish version" exit 1 - check-cron: - name: Check daily release - if: ${{ github.event.schedule }} - runs-on: ubuntu-latest - steps: - name: Checkout Repository uses: actions/checkout@v4 with: fetch-depth: 0 - + - run: | - test "$(npx auto version)" != "patch" || exit 1 + test "$(npx auto version)" != "patch" && exit 0 || exit 1 - run: | - test "$(npx auto version)" != "major" || exit 1 + test "$(npx auto version)" != "major" && exit 0 || exit 1 build: name: Node v${{ matrix.node }} if: ${{ github.event.schedule || github.event.inputs.mode == 'publish' || github.event.inputs.mode == 'force-version' || (github.event_name == 'push' && github.ref_name == 'master') }} + needs: check-version runs-on: ubuntu-latest strategy: matrix: