Add stable v4 release automation
Merged
MO
3mo ago+1490+1490+0123456789012345678901234567890123456789-50-50-01234567890123456789
Now that the v4 package names and versions are established, this PR adds the stable release flow for the TypeScript and Python SDKs.
just changesetrecords the release intent for a pull request.just _versionis used by CI to apply those changes, keep the Python version in sync, and update the root changelog.- Changesets maintains the release pull request on
main. - Merging that release pull request publishes the TypeScript SDK to npm and the Python SDK to PyPI.
The private protocol package is also versioned through Changesets because its major version is the compatibility contract between the SDK and extension, but it is not published to npm.
We keep one root CHANGELOG.md for the repository, beginning with the existing v3 history. The release workflows only run from main, so this stack cannot publish anything.
Summary by cubic
Adds stable v4 release automation for the TypeScript and Python SDKs. On pushes to main, we open a release PR or publish TS to npm, and publish Python to PyPI only when a new version is needed (skips if pending Changesets exist).
-
New Features
- Adopted
changesetsfor@browserbasehq/stagehand,@browserbasehq/stagehand-python, and versioned private@browserbasehq/stagehand-protocol(not published). - Release workflow on
main: runsjust check/just build, opens a release PR viachangesets/action, publishes TS viajust _publish-typescript, then uses a status check to publish Python only if PyPI is missing the version and no Changesets are pending. - Reusable Python workflow: builds wheels/sdists, smoke-tests with
uv, uses trusted publishing, and tagsstagehand-python@<version>. - Consolidated SDK changelogs into the root
CHANGELOG.mdwith SDK-labeled headings; package changelogs are temporary and removed in CI. - Added release scripts and
justtasks to validate Changesets (allowed packages only), consolidate changelogs, sync Python version from the proxypackage.json, verifyuv.lock, gate Python publishing on PyPI status, and clean staledist/artifacts (including legacy names). - Documented the release flow and contributor steps in
README.md.
- Adopted
-
Migration
- When a PR changes a public SDK or the protocol contract, run
just changeset. Internal-only changes don’t need one. - Merge the release PR on
mainto publish TypeScript; Python auto-publishes if the synchronized version is not on PyPI. Release jobs run only onmain.
- When a PR changes a public SDK or the protocol contract, run