Skip to content

ci: inline npm publish into auto-release workflow - #7

Open
Clarit-AI wants to merge 1 commit into
mainfrom
ci/inline-publish-in-auto-release
Open

ci: inline npm publish into auto-release workflow#7
Clarit-AI wants to merge 1 commit into
mainfrom
ci/inline-publish-in-auto-release

Conversation

@Clarit-AI

Copy link
Copy Markdown
Owner

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

  • Merge this PR (no Release label — just a CI change)
  • On the next Release-labelled PR merge, verify both the GitHub Release AND npm publish happen in the same workflow run

For v0.2.2 specifically: the release already exists; the publish has been kicked off manually via `npm publish`.

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.
@kilo-code-bot

kilo-code-bot Bot commented May 25, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • .github/workflows/auto-release.yml

Reviewed by minimax-m2.7 · 74,466 tokens

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