fix(ci): auto-dispatch npm publish when release-please creates releases - #405
Merged
Conversation
Releases created by release-please use the default GITHUB_TOKEN, and GitHub does not fire `on: release` workflows for events created with that token — so publish-package.yml never auto-ran and every npm publish had to be dispatched manually. workflow_dispatch is an explicit exception to that rule, so the release job now dispatches the existing publish-package.yml (the single publishing path) once per released tag. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
JosephSamirL
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
Merging a release-please PR (e.g. #404) creates the GitHub releases + tags, but nothing is published to npm. Every publish has had to be dispatched manually via
publish-package.yml'sworkflow_dispatch.Root cause
The releases are created by
release-please-actionusing the defaultGITHUB_TOKEN. Per GitHub's docs, events triggered byGITHUB_TOKENdo not create new workflow runs — sopublish-package.yml'son: release: publishedtrigger never fires. Its run history confirms it: only manualworkflow_dispatchruns, ever.Fix
Same docs, the exception: "
workflow_dispatchandrepository_dispatchevents always create workflow runs."So the
releasejob now dispatches the existingpublish-package.yml(via its existingtaginput) once per released tag, using the per-path<path>--tag_nameoutputs of release-please-action v4.publish-package.ymlis untouched and remains the single publishing path — this just automates the exact manual dispatch flow used until now.Requires
actions: writepermission (added) forgh workflow run.Verification plan
Next release-please merge should show one
Publish Package to npmjsrun per released tag, eachworkflow_dispatch, with matching npm versions afterwards.🤖 Generated with Claude Code