ci(release): add changesets lint on PRs to staging - #40
Merged
Conversation
Blocks PRs to staging that do not include a .changeset/*.md file. Part of the release system plan (Phase 4). This is the first layer of the implementation stack: lint CI first, workflow rewrite second, documentation third.
The previous version failed because actions/checkout@v4 only fetches the PR branch by default. The git diff against origin/staging returned an ambiguous argument error, which the bash 'if !' then interpreted as 'test failed', triggering the changeset error message incorrectly. Fix: fetch-depth 0, explicit 'git fetch origin staging', and capture the diff output before grepping.
The ci.yml addition requires a changeset to pass the new lint itself. This is a minor bump for @deessejs/errors because the workaround is shipped as part of the package release.
Replaces the existing release.yml with the version described in docs/internal/engineering/plans/release-system.md (Section 3): - Explicit 'has_changesets' detection step. All publish steps are gated on this. A 'version bump' PR with no changesets is a no-op. - Tag is pushed at the version bump commit, not at the merge commit. Fixes the @deessejs/errors@1.1.1 tag drift. - pnpm install --frozen-lockfile (was pnpm install) for reproducibility. - Adds dry_run and packages inputs to workflow_dispatch for tabletop exercises and selective re-publishes. - Keeps the existing 'version bump' label gate on PRs to main. - Adds a changeset to pass the new ci.yml lint. This is the second layer of the release system plan implementation stack: lint CI (PR #1) first, workflow rewrite (this commit) second, documentation update (next) third.
CLAUDE.md and CONTRIBUTING.md both described a 'main <- staging <- dev' flow that the project does not actually follow. The real flow is staging-first: devs land PRs on staging, the release engineer cherry-picks to main with a 'version bump' label, and the release workflow runs on the merge. Also documents: - The CI lint that requires a .changeset/*.md on every PR to staging - The hotfix path (release/hotfix-* branch from main) - The single release engineer convention (no rotation) - The release cadence (one release per package per version bump PR) This is the third layer of the release system plan implementation stack: lint CI (first), workflow rewrite (second), documentation update (this commit). Adds a changeset to pass the new ci.yml lint.
martyy-code
added a commit
that referenced
this pull request
Aug 3, 2026
…ronment) Adds Section 7 (Trusted publishing & environment) to the plan and a matching Appendix C (Post-plan decision log). Two items are added to the Definition of done: - At least one release has been published via npm trusted publishing (OIDC), per Section 7.1. - The GitHub 'release' environment exists with at least one deployment record, per Section 7.2. Plan Status also moves from 'Proposed' to 'Approved and partially implemented on staging' because Phases 3, 4, 5 plus Section 7 are now merged on the staging branch (PRs #40, #41, #42).
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
Adds a CI lint that blocks PRs to
stagingwhich do not include a.changeset/*.mdfile. This is the first layer of the release system plan implementation stack.What is in this PR
.github/workflows/ci.ymlstagingonly.changeset/*.mdfilepnpm changeset status --since=origin/stagingto validate the changeset formatWhy this layer first
This is the bottom of the stacked PR implementation. The lint prevents the failure mode where a feature lands on staging without a changeset and cannot be released later. It does not depend on the workflow rewrite (next layer).
What is NOT in this PR
The next stacked PR (
ci(release): rewrite release workflow) will build on top of this one.Related
docs/internal/engineering/plans/release-system.md(Phase 4)docs/learnings/github/stacked-pr/README.md🤖 Generated with Claude Code