ci(release): gate publish on inline lint/typecheck/test#18
Merged
Conversation
The Release and CI workflows both fire on `push: main` but with no dependency between them — they run in parallel. A merge that broke lint, format, or tests would still trigger Release, and depending on whether the regression crashed `pnpm build`, could ship a broken artifact. Fix: re-run the four CLAUDE.md gates (format:check, lint, typecheck, test) at the top of the Release job, between `pnpm install` and `pnpm build`. Duplication with `ci.yml` is intentional and cheap (~30s warm cache); cleaner alternatives (`workflow_run` trigger, or merging the workflows) trade simplicity for separation-of-concerns. The inline gate is the smallest blast-radius option. No changeset entry — CI-only, not user-visible.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an inline CI gate to the Release workflow so publish is blocked if format/lint/typecheck/test fail, since release and CI run in parallel on push: main.
Changes:
- Inserts four
pnpmchecks (format:check,lint,typecheck,test) between install and build in the Release job. - Adds an explanatory comment justifying the duplication with
ci.yml.
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.
Summary
push: mainindependently, so a red tree could still trigger publish.format:check,lint,typecheck,test) at the top of the Release job, betweenpnpm installandpnpm build.ci.ymlis intentional; ~30s on a warm cache is the cost.Trade-off considered
workflow_runtrigger and merging the workflows are cleaner structurally but pull more rope (default-branch workflow resolution, mixing release config with CI). Inline gating has the smallest blast radius.Test plan
mainstill reaches the changesets/action step (and ideally never has to fail the inline gate, because CI catches it first).