Skip to content

ci: speed up the release loop - #18

Merged
wangyuling93 merged 1 commit into
mainfrom
ci/faster-release
Aug 15, 2026
Merged

ci: speed up the release loop#18
wangyuling93 merged 1 commit into
mainfrom
ci/faster-release

Conversation

@wangyuling93

Copy link
Copy Markdown
Owner

Related Issue

No issue. Follow-up to the stalled release run / version PR #16.

Problem

The publish loop was a two-pass round trip that always paid full CI + a full pnpm build, and sometimes waited on a human:

Step What actually happened
Every push to main Release did install + catalog + full build (~1.5 min) even when it was only going to open/update the version PR, or when there was nothing to release
Version PR CI Full 5-shard test + build + lint + typecheck + Nix (~4 min) for package.json / CHANGELOG bumps whose code already passed CI on main
Version PR update actions/checkout extraheader used the job GITHUB_TOKEN, beating changesets/action's PAT .netrc. Updates landed as github-actions[bot] and CI sat in action_required
Version PR merge PAT merge does emit push, and pull_request closed also fired → two publishes (we saw this on #16)

Happy-path wall clock was ~8 min plus an unbounded approval wait. Auto-merge PRs #12#15 show the version PR is never reviewed — it is only a delay.

What changed

  • Release mode detect: version (pending changesets) skips catalog/build; publish (merge of changeset-release/main) does the full build; anything else skips.
  • CI / Nix: skip heavy jobs on changeset-release/main. The required aggregate CI job still runs and passes.
  • One publish: pull_request closed is only a fallback when merged_by is github-actions[bot]. PAT merges use the push event. One concurrency group, do not cancel in-flight publishes.
  • Checkout persist-credentials: false: version-branch pushes go through CHANGESETS_TOKEN, so follow-up CI is not parked in action_required.

Expected happy path: version PR in ~30s, required CI in ~15s, publish still ~2 min (the build is real). Unrelated main pushes stop spending 2 min in Release.

Not in this PR (say if you want it): drop the version PR and version+publish in one job (~2.5 min total). That fits this repo because the version PR is always auto-merged.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Skip the full build when only opening the version PR, skip Release on
unrelated main pushes, and skip CI/Nix on changeset-release/main so
auto-merge is not blocked for four minutes.

Stop the double publish (PAT merges already emit push; only keep the
pull_request fallback for github-actions[bot] merges) and serialize
Release on one concurrency group.

Leave checkout credentials unset so changesets/action pushes the version
branch with CHANGESETS_TOKEN instead of the job token. The job token
made those updates github-actions[bot] and parked CI in action_required.
@wangyuling93
wangyuling93 merged commit 9e680d0 into main Aug 15, 2026
16 checks passed
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.

1 participant