Skip to content

ci: add lockstep Changesets release automation - #2

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

ci: add lockstep Changesets release automation#2
dortort wants to merge 13 commits into
mainfrom
chore/release-workflow

Conversation

@dortort

@dortort dortort commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Adds Changesets release automation for all seven public packages (agentry-test and the six @agentry/* packages). A changeset for any package bumps the entire group together; private examples are excluded. The CLI publishes as agentry-test and keeps the agentry command.

Package PRs must include a changeset. Generated version PRs consume their changesets, so only the version PR authored by github-actions[bot] from this repository's release branch is exempt from that requirement. Installation, typecheck, tests, and build still run. Each published package includes the repository metadata required for npm provenance.

On pushes to main, the workflow creates or updates the version PR. Publishing is disabled by default: it is enabled only when the repository variable NPM_PUBLISH_ENABLED is true. Once enabled, runs with no pending changesets build and publish unpublished versions to npm with provenance, then create tags and GitHub releases. An enabled workflow fails explicitly if NPM_TOKEN is missing.

Validation

  • Frozen installation, typecheck, all 108 tests, full seven-package build, and actionlint passed locally.
  • Evaluated the actual workflow conditions with GitHub's expressions library: genuine release PR, ordinary PR, human/fork branch impersonation, unrelated bot PR, and wrong base branch.
  • Ran the actual changeset gate in an isolated Git repository: missing changeset fails; empty and release changesets pass; the generated version PR skips the requirement after consuming its changesets.
  • Rehearsed a core-only minor changeset: all seven packages became 0.1.0, the private example stayed unchanged, and the frozen lockfile remained valid.
  • Packed all seven packages and verified repository metadata, built exports, resolved workspace dependencies, and the CLI shebang. Installed the tarballs in an external consumer and verified CLI help and public API imports.
  • Tested publishing disabled/unset, enabled, and missing-credential behavior without publishing to npm.

Before the first publish

The repository setting allowing GitHub Actions to create PRs is enabled. No initial release changeset is included, and packages remain at 0.0.0.

Confirm npm ownership of agentry-test and @agentry/*, configure the NPM_TOKEN secret, and set NPM_PUBLISH_ENABLED=true before merging the first version PR. These are first-publish prerequisites; the default workflow can be merged and manage version PRs without npm credentials. See docs/RELEASING.md for setup, token requirements, and generated-PR CI approval instructions.

@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
@dortort dortort changed the title ci: add Changesets release pipeline (lockstep publish) ci: add lockstep Changesets release automation Sep 7, 2026
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