Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ concurrency:

jobs:
check:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
name: check
runs-on: ubuntu-latest
timeout-minutes: 20
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/version-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ jobs:
fi
# Runs the version script `release:version`: `pnpm version -r` bumps the versioning.fixed group to one shared
# version (the largest bump across the pending changesets), writes each package's CHANGELOG.md and deletes the
# consumed changesets, then `pnpm run check` runs the release gates on the bumped tree. A pull request opened
# with github.token starts no CI until it is marked ready for review, so the gates run here. The action runs
# consumed changesets, then `pnpm run check` runs the release gates on the bumped tree. Every update leaves
# the release PR in Draft; a maintainer marks it Ready for full PR CI. The action runs
# the script before it pushes anything, so a failing gate fails the run and leaves the release PR as it was.
# Otherwise the action commits through the GitHub API (signed) and opens or updates the draft PR
# `changeset-release/main` -> `main`, whose body lists each package's new changelog section. That commit takes
Expand Down
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,19 @@ gh repo-checks protect --repo OWNER/REPO
pnpm run publish:dry-run
```

The full `CI` job named `check` runs when a non-Draft PR is opened, receives new commits (`synchronize`), is
reopened, or is marked Ready for review. It also continues to run on pushes to `main`. Keep work in Draft until
local checks are finished; ordinary and Renovate PRs opened directly as Ready get CI automatically.

The separate lightweight `Review` workflow continues to check repository metadata, PR titles and descriptions
on Draft PRs and description edits. It does not install project dependencies or run the full test suite. Bot
authors remain exempt only from the description check.

When a Draft PR event starts CI, `check` is skipped. GitHub reports skipped jobs as successful, so a green skipped
status is not validation evidence, even when `check` is required by branch protection. After marking the PR Ready,
confirm that `check` actually ran and passed for the current head and merge result before merging. Metadata edits
do not restart full CI; a changed base or comparison still needs a fresh PR validation when the head has not moved.

## Changesets

pnpm builds changelogs and version bumps from changesets in `.changeset/`. A PR that changes what a published
Expand Down
25 changes: 14 additions & 11 deletions docs/development/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ the run fails at it with an authentication error. Configure the publisher and re
3. A breaking release is one whose change records remove or change a public export or a documented behavior.
In 0.x, such a change is recorded as `minor`. For these releases, follow the
[application comparison and upgrade procedure](adoption.md#application-comparison-before-release).
Review the version and changelog diff, then select
**Ready for review**. Pull requests created with the
workflow's `github.token` do not trigger workflows, and the `ready_for_review` event starts CI (closing and
reopening the PR also works). Wait for green checks and squash-merge. To skip the extra click, pass a GitHub App
token or a fine-grained PAT to the action's `github-token` input, never through the `GITHUB_TOKEN` environment
variable, which the action rejects when it differs from the input.
Every version update leaves the release PR in Draft (`pr-draft: always`). Review the version and changelog diff,
then select **Ready for review** to start full PR CI. Closing and reopening a Draft PR does not bypass the Draft
guard. Confirm that `check` actually ran and passed for the current head and merge result before squash-merging;
a skipped check is not validation evidence. PR events created with `github.token` may create runs that require
maintainer approval; follow any GitHub approval prompt rather than assuming no run exists. Changing token type
does not remove the release PR's Draft gate, and this flow needs no new token permissions.
4. The merge push runs Publish npm on the merge commit. After waiting for any other run of the same version, it
checks the state again, creates the annotated tag `vX.Y.Z` locally, and runs `release:check --verify-git`: the
tag equals the version of every published package, no changesets remain and the commit is on `origin/main`. It
Expand Down Expand Up @@ -379,9 +379,12 @@ Run it after `pnpm run check` so `dist` exists.
and blocks the version number permanently; prefer deprecation.
- Once any package of a version is on npm, do not move or reuse its tag. Fix forward with a new version.

## CI Trigger Options
## CI Triggers

`ci.yml` runs on ordinary `pull_request` and `push` events, which is enough for a single-maintainer repository. A
repository that wants CI to validate an exact head/base pair, or to skip CI on drafts, can replace it with a
`workflow_dispatch` workflow that takes `head_sha`/`base_sha` inputs and re-checks the PR head before and after the
run. That design costs a manual trigger per PR; adopt it only when stale or racing CI results are a real problem.
`ci.yml` runs full checks for Ready PRs on `opened`, `synchronize`, `reopened` and `ready_for_review`, and retains
the existing `push` trigger on `main`. Draft PR events skip the full `check` job; lightweight `Review` checks still
run. Release PRs keep their manual Draft-to-Ready handoff. There is no manual dispatch in this CI workflow.

Verify an executed successful `check` for the current head and merge result, not a skipped Draft check or a result
for an older comparison. If only the base changed, update the branch or select Draft then Ready to request fresh
PR validation. See [Required Checks](../../CONTRIBUTING.md#required-checks) for the shared PR policy.
Loading