From 08989e64c7a8620c46c61f8e2317a7156f438c80 Mon Sep 17 00:00:00 2001 From: Isaac Cormack Date: Tue, 23 Feb 2021 20:55:31 -0800 Subject: [PATCH 1/2] split bump npm version into its own job --- .github/workflows/main.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d8a98d67..2aca7894 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -92,9 +92,8 @@ jobs: fail_ci_if_error: true # optional (default = false) verbose: true # optional (default = false) - publish-npm: - if: github.ref == 'refs/heads/master' && github.actor == 'vikelabs-bot' - needs: [ lint, build, test ] + bump-npm-version: + if: github.ref == 'refs/heads/master' && github.actor != 'vikelabs-bot' environment: deployment runs-on: ubuntu-latest steps: @@ -108,6 +107,20 @@ jobs: git config --global user.name 'vikelabs-bot' git config --global user.email 'vikelabs-bot-github@vikelabs.ca' + - name: Bump minor version + uses: 'phips28/gh-action-bump-version@master' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + publish-npm: + if: github.ref == 'refs/heads/master' && github.actor == 'vikelabs-bot' + needs: [ lint, build, test ] + environment: deployment + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Node.js uses: actions/setup-node@v1 with: @@ -124,11 +137,6 @@ jobs: - name: Install dependencies run: npm ci --ignore-scripts --no-audit --no-progress - - name: Bump minor version - uses: 'phips28/gh-action-bump-version@master' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Create .npmrc for auth token publishing run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc env: From 6492ce275e677213ab594056cf6a695a5ed32304 Mon Sep 17 00:00:00 2001 From: Isaac Cormack Date: Tue, 23 Feb 2021 21:21:30 -0800 Subject: [PATCH 2/2] add needs --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2aca7894..fb597cbc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -94,6 +94,7 @@ jobs: bump-npm-version: if: github.ref == 'refs/heads/master' && github.actor != 'vikelabs-bot' + needs: [ lint, build, test ] environment: deployment runs-on: ubuntu-latest steps: