From fe7d3ec6380cfb3759aae76f239184d470ef4582 Mon Sep 17 00:00:00 2001 From: robby rabbitman Date: Sat, 29 Jun 2024 19:43:24 +0200 Subject: [PATCH] ci: publish in dry run mode on manual dispatch --- .github/workflows/publish.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e341e908..6bf6923f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,7 @@ name: publish on: + workflow_dispatch: release: types: [published] @@ -23,13 +24,19 @@ jobs: cache: 'pnpm' cache-dependency-path: 'pnpm-lock.yaml' + - run: pnpm whoami && echo 'npm credentials are valid' || (echo 'npm credentials are invalid or have expired.' && exit 1) + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} + - uses: nrwl/nx-set-shas@v4 - run: pnpm i - run: pnpm exec nx report - - run: pnpm exec nx release publish --dry-run + - run: pnpm exec nx release publish --dry-run=${{ env.DRY_RUN }} env: + DRY_RUN: true + # DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && 'true' || 'false' }} NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} NPM_CONFIG_PROVENANCE: true