fix(ci): chain npm publish + plugin sync into release-binary workflow#99
Merged
George-iam merged 1 commit intomainfrom Apr 10, 2026
Merged
Conversation
The previous setup had two separate workflows: - release-binary.yml: triggered on `push: tags: v*`, builds binaries and creates a GitHub Release via softprops/action-gh-release using GITHUB_TOKEN - npm-publish.yml: triggered on `release: published`, publishes to npm and syncs the plugin repo The chain was broken by a documented GitHub Actions safety: events fired by GITHUB_TOKEN (anti-recursion protection) do NOT trigger downstream workflows. So when release-binary created the release, npm-publish.yml never ran for v0.2.7. Releases v0.2.3-v0.2.6 worked because the user manually created the GitHub Release after the binary build, which counts as a non-bot event and triggered the chain. Fix: collapse npm-publish.yml into release-binary.yml as two `needs:`-chained jobs in the same workflow run. Same workflow = same run = no cross-workflow trigger needed. The result is identical user-facing behavior (binaries on GitHub releases + npm publish + plugin repo sync) but with a single trigger: push tag. - release-binary.yml: added publish-npm and sync-plugin-repo jobs - npm-publish.yml: deleted Verified by inspecting the new workflow YAML; will be validated end-to-end on the next release tag push. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
For v0.2.7 release the binaries got built and uploaded to GitHub Releases, but npm publish never ran and the plugin repo was not synced. The chain was broken by a documented GitHub Actions safety:
So the previous setup was:
Releases v0.2.3-v0.2.6 worked because the user manually created the GitHub Release in the UI after the binary build, which counts as a non-bot event and triggered the chain. v0.2.7 went via the bot path and broke.
Fix
Collapse `npm-publish.yml` into `release-binary.yml` as two `needs:`-chained jobs in the same workflow run:
```
build (4 matrix jobs)
↓
release (creates GitHub Release with binaries)
↓
publish-npm (npm ci + lint + test + npm publish)
↓
sync-plugin-repo (clones axme-code-plugin, copies dist/plugin/, pushes)
```
Same workflow = same run = no cross-workflow trigger needed. Single source of truth: push a v* tag, get all four artifacts.
Files
Impact
Test plan
Notes
🤖 Generated with Claude Code