Skip to content

ci: add Changesets release pipeline (lockstep publish) - #2

Open
dortort wants to merge 10 commits into
mainfrom
chore/release-workflow
Open

ci: add Changesets release pipeline (lockstep publish)#2
dortort wants to merge 10 commits into
mainfrom
chore/release-workflow

Conversation

@dortort

@dortort dortort commented Aug 5, 2026

Copy link
Copy Markdown
Owner

What

Adds an automated release pipeline for the Agentry monorepo using Changesets, with lockstep versioningagentry, @agentry/core, @agentry/claude, and @agentry/mcp version and publish together at one shared version (Playwright-style).

Flow

  1. Add a changeset with each change (pnpm changeset). CI enforces this on PRs that touch a published package.
  2. Merge to main → the Release workflow opens/updates a "version packages" PR that bumps all four and writes changelogs.
  3. Merge that PR → the workflow builds and runs changeset publish, publishing all four to npm with provenance, then pushes tags.

Changes

  • .changeset/config.jsonfixed group (lockstep), access: public, privatePackages off so examples/* never publish.
  • .github/workflows/release.ymlchangesets/action@v1, NPM_TOKEN auth, id-token: write + provenance.
  • .github/workflows/ci.yml — PR-only changeset status gate.
  • Root package.jsonchangeset, version-packages, release scripts.
  • docs/RELEASING.md — process + one-time setup.

Verified

  • Lockstep proven via a throwaway changeset version: a core-only changeset bumped all four to 0.1.0; private examples untouched.
  • actionlint clean on both workflows; lockfile consistent; typecheck + 85/85 tests green.
  • Uses changesets/action@v1 (current released major, v1.9.0), not the unreleased v2 API.

⚠️ Before the first publish (see docs/RELEASING.md)

  • Resolve the agentry npm name — already taken (agentry@0.1.0, unrelated). Publish the CLI scoped as @agentry/cli, pick a new unscoped name, or claim it. @agentry/* scope is free.
  • Create the @agentry npm org; add NPM_TOKEN repo secret; confirm dist/bin.js carries a shebang.
  • Cut the first 0.1.0 changeset (deliberately omitted — no name to publish under yet).

🤖 Generated with Claude Code

@dortort dortort self-assigned this Aug 8, 2026
@dortort
dortort force-pushed the chore/release-workflow branch from 2ec2c06 to 525eccd Compare August 8, 2026 22:39
dortort and others added 10 commits August 8, 2026 18:48
Configure @changesets/cli so the four Agentry packages (agentry,
@agentry/core, @agentry/claude, @agentry/mcp) version and publish
together at one shared version — Playwright-style — rather than
drifting independently. Adds `changeset`, `version-packages`, and
`release` scripts.

Constraint: agentry + @agentry/* are one product; must release in lockstep
Rejected: semantic-release | single-package oriented, weaker monorepo story
Rejected: independent per-package versions | diverges from the Playwright model
Confidence: high
Scope-risk: narrow

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On push to main, changesets/action@v1 opens/updates a "version
packages" PR; merging it builds and runs `changeset publish`. Reuses
the same typecheck + test gate as CI before any publish. npm auth via
the NPM_TOKEN secret (the action writes .npmrc); id-token:write +
NPM_CONFIG_PROVENANCE enable npm provenance.

Constraint: changesets/action latest release is v1.9.0 — v1 input names
Directive: do not add setup-node registry-url — it pre-empts the action's
  NPM_TOKEN .npmrc and breaks publish auth
Confidence: high
Scope-risk: moderate
Not-tested: live npm publish (requires NPM_TOKEN secret + resolved package name)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a pull-request-only job that runs `changeset status` against the
base branch and fails when a publishable package changed without an
accompanying changeset — keeps the lockstep changelog honest. Fetches
the base ref (fetch-depth: 0) so --since has a merge-base.

Rejected: changeset bot comment | needs a GitHub App install; CI check is self-contained
Confidence: high
Scope-risk: narrow

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add docs/RELEASING.md covering the changeset -> version PR -> publish
flow, the lockstep model, one-time setup (npm name, org, NPM_TOKEN,
CLI shebang), and how to cut the first 0.1.0 release.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Set privatePackages { version:false, tag:false } so example workspaces
(examples/*, all private) are never versioned, changelogged, or tagged
by a release, and never trip the PR changeset gate. Only the four
published packages participate in releases.

Confidence: high
Scope-risk: narrow

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The bare `agentry` name on npm belongs to an unrelated, active package,
so the CLI publishes as `agentry-test` (mirroring @playwright/test). The
`bin` stays `agentry`, so the installed command is unchanged; the public
import specifier becomes `agentry-test` (like `@playwright/test`). Also
updates the example's workspace dep, the `init` scaffolding templates,
and the changeset `fixed` group to match.

Rejected: scoped @agentry/cli | user asked for an unscoped name
Confidence: high
Scope-risk: narrow

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The CLI rename touches a publishable package, so the changeset gate
requires a changeset. Nothing has been published yet, so the rename has
no release impact — an empty changeset records "no release needed" and
keeps CI green without opening a version PR.

Confidence: high
Scope-risk: narrow

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Update the import examples and the install command across README, SPEC,
ROADMAP, and RELEASING to the agentry-test package name (bin/command
stays `agentry`).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Packages table and project-layout tree still labelled the CLI
package `agentry`; it publishes as `agentry-test` (command stays
`agentry`). Import examples were already updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
main added three publishable driver packages (@agentry/codex,
@agentry/gemini, @agentry/antigravity) after this branch was cut. They
are part of the Agentry product, so they join the `fixed` group and
release in lockstep with the rest; RELEASING.md now lists all seven
publishable packages.

Constraint: lockstep model — every publishable @agentry/* package releases together
Confidence: high
Scope-risk: narrow

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dortort
dortort force-pushed the chore/release-workflow branch from 525eccd to 257d7e9 Compare August 8, 2026 23:48
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