Repository navigation
feat(evals): add stagehand_facade tool surface (#2750) #1193
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| id-token: write | |
| pull-requests: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| release-typescript: | |
| name: Release TypeScript SDK | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| with: | |
| version: "11.10.0" | |
| run_install: false | |
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 | |
| with: | |
| node-version: "24" | |
| cache: pnpm | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Install npm | |
| run: npm install --global npm@11.16.0 | |
| - name: Set up Python | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version-file: packages/sdk-python/.python-version | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| version: "0.11.29" | |
| working-directory: packages/sdk-python | |
| enable-cache: true | |
| cache-dependency-glob: packages/sdk-python/uv.lock | |
| - uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3.1.0 | |
| - run: just install | |
| # Generate and format checked-in artifacts before validating the worktree. | |
| - run: just build | |
| - run: just check | |
| - name: Create release pull request or publish TypeScript | |
| id: changesets | |
| uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1.9.0 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| version: just _version | |
| publish: just _publish-typescript | |
| title: Release Stagehand packages | |
| commit: release Stagehand packages | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CHANGESETS_ACTION_PRESERVE_CHANGELOGS: "true" | |
| publish-typescript-alpha: | |
| name: Publish TypeScript SDK alpha | |
| needs: release-typescript | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| with: | |
| version: "11.10.0" | |
| run_install: false | |
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 | |
| with: | |
| node-version: "24" | |
| cache: pnpm | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Install npm | |
| run: npm install --global npm@11.16.0 | |
| - uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3.1.0 | |
| - run: pnpm install --frozen-lockfile | |
| # The TypeScript SDK bundles the extension, which in turn needs the protocol schema. | |
| - run: pnpm exec turbo run build --filter=@browserbasehq/stagehand | |
| # Versions every package with a pending changeset as `<next>-alpha-<sha>` and | |
| # publishes the public ones under the `alpha` dist-tag. The working tree is | |
| # discarded afterwards, so nothing is committed. No-op when there are no | |
| # unreleased changesets (e.g. the push that just cut a stable release). | |
| - name: Publish alpha | |
| run: just _publish-typescript-alpha | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| python-release-status: | |
| name: Check Python release status | |
| needs: release-typescript | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| outputs: | |
| should-publish: ${{ steps.status.outputs.should-publish }} | |
| steps: | |
| - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| with: | |
| version: "11.10.0" | |
| run_install: false | |
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 | |
| with: | |
| node-version: "24" | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - name: Check PyPI | |
| id: status | |
| run: echo "should-publish=$(pnpm exec tsx scripts/release/python-publish-status.ts)" >> "$GITHUB_OUTPUT" | |
| publish-python: | |
| name: Release Python SDK | |
| needs: python-release-status | |
| if: needs.python-release-status.outputs.should-publish == 'true' | |
| uses: ./.github/workflows/publish-python.yml | |
| secrets: inherit | |
| python-alpha-status: | |
| name: Check Python alpha status | |
| needs: release-typescript | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| outputs: | |
| should-publish: ${{ steps.status.outputs.should-publish }} | |
| version: ${{ steps.status.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| with: | |
| version: "11.10.0" | |
| run_install: false | |
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 | |
| with: | |
| node-version: "24" | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| # Only packages with pending changesets receive a snapshot version, so this | |
| # tells us whether the Python SDK has anything unreleased to publish. | |
| - run: pnpm exec changeset version --snapshot | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Check alpha version | |
| id: status | |
| run: node scripts/release/python-alpha-version.ts --check >> "$GITHUB_OUTPUT" | |
| publish-python-alpha: | |
| name: Release Python SDK alpha | |
| needs: python-alpha-status | |
| if: needs.python-alpha-status.outputs.should-publish == 'true' | |
| uses: ./.github/workflows/publish-python.yml | |
| with: | |
| alpha: true | |
| secrets: inherit | |
| publish-go: | |
| name: Release Go SDK | |
| needs: release-typescript | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 | |
| with: | |
| node-version: "24" | |
| - name: Check Go release status | |
| id: status | |
| run: node scripts/release/go-publish-status.ts >> "$GITHUB_OUTPUT" | |
| - name: Tag Go release | |
| if: steps.status.outputs.should-tag == 'true' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| TAG: ${{ steps.status.outputs.tag }} | |
| run: | | |
| gh api --method POST "repos/$GITHUB_REPOSITORY/git/refs" \ | |
| -f ref="refs/tags/$TAG" \ | |
| -f sha="$GITHUB_SHA" |