Skip to content

ci(release): add changesets lint on PRs to staging - #40

Merged
codewizdave merged 5 commits into
stagingfrom
docs/release-system-plan
Aug 3, 2026
Merged

ci(release): add changesets lint on PRs to staging#40
codewizdave merged 5 commits into
stagingfrom
docs/release-system-plan

Conversation

@martyy-code

Copy link
Copy Markdown
Contributor

Summary

Adds a CI lint that blocks PRs to staging which do not include a .changeset/*.md file. This is the first layer of the release system plan implementation stack.

What is in this PR

  • New file: .github/workflows/ci.yml
  • Runs on PRs against staging only
  • Verifies that the PR diff includes at least one .changeset/*.md file
  • Runs pnpm changeset status --since=origin/staging to validate the changeset format

Why 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

  • No changes to the release workflow itself
  • No documentation changes
  • No tag or branch changes

The next stacked PR (ci(release): rewrite release workflow) will build on top of this one.

Related

  • Plan: docs/internal/engineering/plans/release-system.md (Phase 4)
  • Learnings: docs/learnings/github/stacked-pr/README.md

🤖 Generated with Claude Code

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.
@codewizdave
codewizdave merged commit f24759e into staging Aug 3, 2026
5 checks passed
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).
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