From 81e8ce87145f0fc03ab1efa06038dc82853df9c4 Mon Sep 17 00:00:00 2001 From: Jace Date: Sat, 1 Aug 2026 21:11:42 -0700 Subject: [PATCH] fix(ci): publish CLI on dedicated cli-v* tag, not product v* tag The CLI depends on @e2a/sdk, but the SDKs publish on their own ts-sdk-v* / python-v* tags pushed after the product tag. Triggering publish-cli.yml on v* therefore always published the CLI before the SDK version it was built against (observed on v1.5.0: @e2a/cli@2.2.0 hit npm ~4 minutes before @e2a/sdk@5.5.0). A CLI that needed a new SDK method would be installable-and-broken during that window. Publishing the CLI now requires pushing a cli-v tag after ts-sdk-v*, matching the SDK release pattern. workflow_dispatch stays. Co-Authored-By: Claude Opus 5 --- .github/workflows/publish-cli.yml | 8 +++++++- AGENTS.md | 7 +++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-cli.yml b/.github/workflows/publish-cli.yml index d6b1d184e..7db0ab311 100644 --- a/.github/workflows/publish-cli.yml +++ b/.github/workflows/publish-cli.yml @@ -1,8 +1,14 @@ name: Publish CLI +# Dedicated tag, NOT the product "v*" release tag: the CLI depends on +# @e2a/sdk, and the SDKs publish on their own ts-sdk-v* / python-v* tags +# pushed after the product tag. Publishing the CLI from "v*" therefore +# always raced ahead of the SDK it was built against (observed on v1.5.0: +# @e2a/cli@2.2.0 hit npm ~4 minutes before @e2a/sdk@5.5.0). Push cli-v* +# after ts-sdk-v* so the SDK is installable first. on: push: - tags: ["v*"] + tags: ["cli-v*"] workflow_dispatch: concurrency: diff --git a/AGENTS.md b/AGENTS.md index 226b71cc1..5ae4ba495 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -437,7 +437,10 @@ manually on every API change even though the template won't remind you. - **Publishing** (all tag/dispatch-triggered GitHub workflows): - Python SDK: bump `sdks/python/pyproject.toml` version, tag `python-v*`. - TS SDK: bump `sdks/typescript/package.json` version, tag `ts-sdk-v*`. - - CLI: bump `cli/package.json` version, then GitHub release publish or - `gh workflow run "Publish CLI" --ref main`. + - CLI: bump `cli/package.json` version, tag `cli-v*` (or + `gh workflow run "Publish CLI" --ref main`). Deliberately NOT the + product `v*` tag: the CLI depends on `@e2a/sdk`, so push `cli-v*` + only after `ts-sdk-v*` — publishing from the product tag raced the + CLI onto npm before its SDK existed. - MCP: hosted-only — `publish-mcp-http.yml` pushes the HTTP image on tag; npm publish is retired.