Skip to content

fix(ci): auto-dispatch npm publish when release-please creates releases - #405

Merged
abbaseya merged 1 commit into
mainfrom
fix/ci-auto-dispatch-npm-publish
Jun 5, 2026
Merged

fix(ci): auto-dispatch npm publish when release-please creates releases#405
abbaseya merged 1 commit into
mainfrom
fix/ci-auto-dispatch-npm-publish

Conversation

@abbaseya

@abbaseya abbaseya commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

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's workflow_dispatch.

Root cause

The releases are created by release-please-action using the default GITHUB_TOKEN. Per GitHub's docs, events triggered by GITHUB_TOKEN do not create new workflow runs — so publish-package.yml's on: release: published trigger never fires. Its run history confirms it: only manual workflow_dispatch runs, ever.

Fix

Same docs, the exception: "workflow_dispatch and repository_dispatch events always create workflow runs."

So the release job now dispatches the existing publish-package.yml (via its existing tag input) once per released tag, using the per-path <path>--tag_name outputs of release-please-action v4. publish-package.yml is untouched and remains the single publishing path — this just automates the exact manual dispatch flow used until now.

Requires actions: write permission (added) for gh workflow run.

Verification plan

Next release-please merge should show one Publish Package to npmjs run per released tag, each workflow_dispatch, with matching npm versions afterwards.

🤖 Generated with Claude Code

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>
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@sonarqubecloud

sonarqubecloud Bot commented Jun 5, 2026

Copy link
Copy Markdown

@abbaseya abbaseya self-assigned this Jun 5, 2026
@abbaseya
abbaseya requested a review from a team June 5, 2026 18:13
@abbaseya
abbaseya merged commit 71de25c into main Jun 5, 2026
6 checks passed
@abbaseya
abbaseya deleted the fix/ci-auto-dispatch-npm-publish branch June 5, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants