Skip to content

ci: npm publish pipeline for @corbits workflows and tools (CL-8167) - #763

Merged
TheGreatAxios merged 5 commits into
mainfrom
cl-8167-publish-pipeline
Sep 17, 2026
Merged

TheGreatAxios merged 5 commits into
mainfrom
cl-8167-publish-pipeline

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

Adds the changesets-driven npm publish pipeline for every workflows/*
and packages/*-tools package CL-8157 (#760) made publishable:

  • .changeset/config.json — access: public, baseBranch: main, and an
    ignore list computed (never hand-typed) from every workspace
    package's private flag, extended to any package that transitively
    depends on a still-private one. That extension caught a real gap:
    @corbits/code-review-workflow is public but depends on the still-private
    @corbits/code-review, which would make its published tarball
    uninstallable — it's excluded until one side of that changes.
    scripts/gen-changeset-config.ts regenerates the list; the new
    changeset-ignore structural check fails on drift.
  • scripts/release.ts — packs and publishes every publishable package
    whose version is ahead of what's on npm, skipping already-published
    versions. --dry-run runs the same pack + npm publish --dry-run
    without touching the registry or needing a token. Never reads a
    credential from a file.
  • .github/workflows/publish.yml — publish-dry-run runs on every pull
    request (no secrets needed). On push to main, changesets/action
    opens/updates the "Version Packages" PR while changesets are pending;
    once that PR merges, the same job runs the real, provenance-signed
    release with NPM_TOKEN and id-token: write.
  • A .changeset/first-publishable-release.md changeset bumps every
    currently publishable package as a minor, so the version PR has
    something to do.
  • CONTRIBUTING.md and the tool-package-freshness check's message now
    point at bun run changeset instead of a hand-bumped version.

Owner action required

  • NPM_TOKEN must be added to the repo's GitHub Actions secrets
    before the first release job can publish (an npm automation/granular
    token with publish rights to the @corbits org).
  • Confirm the @corbits npm org exists and this token can publish to it
    — the pipeline assumes both.

Verification

  • bun run typecheck — passes except two pre-existing failures in
    packages/chat-ui/test/* unrelated to this change (present before
    this branch touched anything, confirmed via git log on those files).
  • bun run lint — passes except one pre-existing formatting warning in
    scripts/checks/publishable-workflows.ts, untouched by this PR.
  • bun run check:structural — all checks green, including the new
    changeset-ignore check.
  • bun run release -- --dry-run — packed and dry-run published all 27
    currently publishable packages cleanly.
  • bun x @changesets/cli status — reports the pending minor bump for
    all 27 packages, no config errors.

Test plan

  • Owner adds NPM_TOKEN secret
  • Merge this PR into main, confirm the "Version Packages" PR opens
  • Merge that version PR, confirm the release job publishes to npm
    with provenance

https://claude.ai/code/session_01RweuMUskU2nvcFhdckc7EG

@linear-code

linear-code Bot commented Sep 17, 2026

Copy link
Copy Markdown

CL-8167

@TheGreatAxios
TheGreatAxios force-pushed the cl-8167-publish-pipeline branch from 928ea79 to d169b40 Compare September 17, 2026 17:53
CL-8167 adds a check verifying .changeset/config.json's ignore list
stays in sync with the workspace's publishable packages; extend the
roster test that pins check:structural's discovered set so it expects
the new check by name.

Claude-Session: https://claude.ai/code/session_01RweuMUskU2nvcFhdckc7EG
…-8167)

Wires @changesets/cli into the packages CL-8157 made publishable:
- .changeset/config.json (public access, main as the base branch) with
  an `ignore` list computed from every workspace package's `private`
  flag, plus any package that transitively depends on one of those
  (@corbits/code-review-workflow depends on the still-private
  @corbits/code-review, so it stays out of the publish set until one of
  the two changes).
- scripts/gen-changeset-config.ts regenerates that list; the new
  changeset-ignore structural check fails when it drifts.
- scripts/release.ts packs and publishes every publishable package
  whose version moved past what's on npm, skipping ones already
  published; `--dry-run` packs and `npm publish --dry-run`s everything
  without a token, for local and CI use. It never reads a credential
  from a file — the token comes from the environment.
- .github/workflows/publish.yml: `publish-dry-run` runs the dry-run on
  every pull request; on push to main, changesets/action opens or
  updates the version PR, and once its changesets are gone it runs the
  real, provenance-signed release.
- A "first publishable release" changeset bumps every currently
  publishable package as a minor, so the version PR has something to
  release once this lands.
- tool-package-freshness's error message now points at `bun run
  changeset` instead of a hand-bumped version, since changesets is now
  how that bump gets made.

NPM_TOKEN must be added to the repository's secrets before the first
release can run.

Claude-Session: https://claude.ai/code/session_01RweuMUskU2nvcFhdckc7EG
Documents the CL-8167 flow in CONTRIBUTING.md: run `bun run changeset`
and commit the generated file alongside a tool or workflow change,
instead of hand-bumping its version; the automated version PR does the
bump and changelog.

Claude-Session: https://claude.ai/code/session_01RweuMUskU2nvcFhdckc7EG
.changeset/config.json's ignore list was hand-stale after rebasing onto
origin/main: @workbench/templates no longer exists (deleted templates/),
and @corbits/preferences / @corbits/run-key-history dropped their dead
hub mounts, so scripts/gen-changeset-config.ts recomputes the ignore
list from disk instead of carrying the old snapshot. bun.lock refreshed
via bun install against origin/main's lock.
Main's tool-package flips (access-tools, interaction-tools,
connections-tools, error-sink, code-review now public) move them off the
changesets ignore list; the first-publishable-release changeset is
updated to cover every non-private workspace package.
@TheGreatAxios
TheGreatAxios force-pushed the cl-8167-publish-pipeline branch from d169b40 to 687ce1a Compare September 17, 2026 17:58
@TheGreatAxios
TheGreatAxios merged commit a16a7e3 into main Sep 17, 2026
10 of 11 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