Skip to content

Commit

Permalink
ci: publish in dry run mode on manual dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
robby rabbitman committed Jun 29, 2024
1 parent b599bc1 commit fe7d3ec
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: publish

on:
workflow_dispatch:
release:
types: [published]

Expand All @@ -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

0 comments on commit fe7d3ec

Please sign in to comment.