Skip to content

Commit 86ac25b

Browse files
committed
Add workflow_dispatch trigger for testing NPM publish
1 parent 89ef032 commit 86ac25b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ name: Publish to NPM
33
on:
44
release:
55
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
dry_run:
9+
description: 'Run without actually publishing (dry run)'
10+
required: false
11+
default: true
12+
type: boolean
613

714
jobs:
815
publish-npm:
@@ -35,7 +42,14 @@ jobs:
3542
- name: Build package
3643
run: npm run build
3744

45+
- name: Publish to NPM (dry run)
46+
if: ${{ github.event.inputs.dry_run == 'true' }}
47+
run: npm publish --dry-run --provenance --access public
48+
env:
49+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
50+
3851
- name: Publish to NPM
52+
if: ${{ github.event.inputs.dry_run != 'true' }}
3953
run: npm publish --provenance --access public
4054
env:
4155
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)