Skip to content

Commit 63b5bd7

Browse files
committed
fix(ci): support workflow_dispatch events in npm publish workflow
- Add workflow_dispatch to publish step conditional - Add workflow_dispatch to verify publication step - Add workflow_dispatch to GitHub release job conditional - Enables manual workflow triggers to publish packages
1 parent 0c145c7 commit 63b5bd7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/release-npm.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
done
138138
139139
- name: Publish to npm
140-
if: github.event_name == 'push'
140+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
141141
env:
142142
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
143143
FORCE_NPM_TOKEN: ${{ inputs.force_npm_token }}
@@ -192,7 +192,7 @@ jobs:
192192
echo "✅ All packages published successfully to '$TAG' channel"
193193
194194
- name: Verify publication
195-
if: github.event_name == 'push'
195+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
196196
run: |
197197
echo "Waiting 30 seconds for npm registry propagation..."
198198
sleep 30
@@ -257,7 +257,7 @@ jobs:
257257
name: Create GitHub Release
258258
runs-on: ubuntu-latest
259259
needs: [semantic-release, publish-npm]
260-
if: needs.semantic-release.outputs.new-release-published == 'true' && github.event_name == 'push'
260+
if: needs.semantic-release.outputs.new-release-published == 'true' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
261261

262262
steps:
263263
- name: Checkout code

0 commit comments

Comments
 (0)