ci: inline npm publish into auto-release workflow - #7
Open
Clarit-AI wants to merge 1 commit into
Open
Conversation
Releases created by a workflow's default GITHUB_TOKEN do not trigger other workflows (a GH Actions safety feature against infinite loops). That meant auto-release.yml was creating the release but publish.yml never picked it up. Fix: run typecheck/test/build/publish steps in the same job as the release creation. publish.yml is kept so manual releases created via the GitHub UI (which use the user token and DO cascade) still work.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Reviewed by minimax-m2.7 · 74,466 tokens |
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.
Why
When PR #6 merged with the `Release` label, `auto-release.yml` created the v0.2.2 release successfully — but `publish.yml` never triggered. Root cause: GitHub Actions deliberately suppresses workflow cascades when the upstream release was created using the default `GITHUB_TOKEN` (prevents infinite loops). So `on: release: published` never fired.
Fix
Run the publish steps in the same job as the release creation. No new secrets needed (workflow already has access to `NPM_TOKEN` and OIDC `id-token` permission).
`publish.yml` is intentionally kept — it still works for manual releases created via the GitHub Releases UI, since those use the user's token (not `GITHUB_TOKEN`) and DO cascade.
Test plan
For v0.2.2 specifically: the release already exists; the publish has been kicked off manually via `npm publish`.