chore: Decouple browse-cli release cycle from stagehand core

Merged
SH
8mo ago
+132-0

Summary

  • Adds @browserbasehq/browse-cli to the changeset ignore list so the main "Version Packages" PR no longer includes CLI version bumps
  • Creates a new release-cli.yml workflow (triggered via workflow_dispatch) that independently versions and publishes browse-cli to npm

How it works

Main release flow (release.yml) — unchanged, but now skips browse-cli. Core stagehand changesets are versioned and published as before.

CLI release flow (release-cli.yml) — triggered manually via GitHub Actions "Run workflow":

  1. Detects pending browse-cli changesets (fails early if a changeset mixes browse-cli with other packages)
  2. Temporarily swaps the changeset ignore config to version only browse-cli
  3. Runs changeset version to consume CLI changesets and bump packages/cli/package.json
  4. Builds all packages, publishes browse-cli to npm via Trusted Publishing
  5. Commits the version bump and pushes a git tag

Constraints

  • Changesets that reference both browse-cli and another package (e.g., stagehand core) must be split into separate changeset files — the workflow enforces this with a pre-check
  • browse-cli is excluded from canary (alpha) releases — add a canary step to release-cli.yml if needed later

Test plan

  • Verify existing release.yml still creates "Version Packages" PR for core changesets (browse-cli changesets should be excluded)
  • Trigger release-cli.yml via workflow_dispatch with a pending browse-cli changeset and verify it publishes correctly
  • Verify mixed changeset detection fails the workflow with a clear error

🤖 Generated with Claude Code


Summary by cubic

Decouples the @browserbasehq/browse-cli release cycle from stagehand core so we can ship CLI updates independently. Implements STG-1663.

  • New Features

    • Adds @browserbasehq/browse-cli to .changeset ignore so release.yml skips CLI.
    • Adds release-cli.yml (manual via workflow_dispatch, restricted to main) to version and publish CLI with Trusted Publishing.
    • Pre-checks for CLI-only changesets; fails on mixed changesets.
    • Temporarily swaps .changeset ignore to version only CLI and strips the @browserbasehq/stagehand workspace dep before changeset version to satisfy Changesets; restores both after.
    • Builds and publishes packages/cli to npm, commits the bump, and tags.
  • Migration

    • Split changesets that touch CLI and core.
    • Use the “Release CLI” workflow to publish CLI releases.
    • Canary releases for CLI are not included.