From 8b9a99d286eafda30c90130869542eee35cf503f Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Tue, 10 Sep 2019 20:56:45 -0400 Subject: [PATCH] Enable dry runs for publishing --- .github/workflows/main.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5a1cca59..60eaa1aa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -58,9 +58,16 @@ jobs: run: npm install - name: Run linting, tests, minify run: grunt - - name: Deploy + - name: Deploy (release) + if: github.event_name == 'release' + run: npm publish --dry-run + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Deploy (release candidate) if: github.event_name == 'push' - run: npm publish + run: | + npm --no-git-tag-version version prerelease + npm publish --tag next --dry-run env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} deploy_npm: @@ -80,7 +87,7 @@ jobs: - name: Run linting, tests, minify run: grunt - name: Deploy - if: github.event_name == 'release' - run: npm publish + if: github.event_name == 'push' + run: npm publish --dry-run env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}