Skip to content

Conversation

@monadoid
Copy link
Contributor

@monadoid monadoid commented Dec 23, 2025

why

Fix server binaries not publishing because tag pushes from CI didn’t trigger the separate tag-based workflow.

what changed

Move server binary build + GitHub Release publishing into release.yml, gated on Changesets publishing @browserbasehq/stagehand-server.

test plan

See if binaries are published in release (can't test with act)


Summary by cubic

Moved the stagehand/server binary build and GitHub Release into the main release workflow. Fixes missed server binary releases by gating on Changesets publishing of @browserbasehq/stagehand-server.

  • Bug Fixes

    • Server binaries now publish reliably, triggered by Changesets publish instead of CI tag pushes.
  • Refactors

    • Integrated server build and release into .github/workflows/release.yml with detection outputs (server_published, server_version, server_tag).
    • Added a cross-platform build matrix and a release job that attaches the OpenAPI spec and SHA256 checksums.
    • Removed .github/workflows/stagehand-server-release.yml.

Written for commit 180a1c8. Summary will update automatically on new commits.

@changeset-bot
Copy link

changeset-bot bot commented Dec 23, 2025

⚠️ No Changeset found

Latest commit: 180a1c8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 23, 2025

Greptile Summary

This PR consolidates server binary building and GitHub Release publishing into the main release.yml workflow, eliminating the dependency on a separate tag-triggered workflow. The change fixes an issue where tag pushes from CI weren't triggering the old stagehand-server-release.yml workflow.

Key Changes

  • Moves server_build_binaries and server_publish_release jobs from the deleted stagehand-server-release.yml into release.yml
  • Adds output variables (server_published, server_version, server_tag) to the release job
  • Adds detection logic to identify if @browserbasehq/stagehand-server was published via Changesets
  • Creates git tags and triggers build/publish jobs conditionally based on server publication
  • Adds clarifying comments to Windows binary builds explaining SDK package selection
  • Improves checksum creation to handle edge cases with empty binary lists

Architecture Improvement

The new flow is more robust: it creates tags automatically from the detected version (not relying on external tag pushes) and orchestrates the entire build→publish pipeline within a single workflow triggered by main branch pushes.

Confidence Score: 4/5

  • This PR is safe to merge with high confidence - it correctly moves existing functionality into a more robust architecture without introducing new risks.
  • The consolidation addresses a real workflow trigger problem (tag-based trigger failing). The detection logic properly checks if the server package was in the published list. The binary build steps are identically copied from the old workflow with added clarifying comments. Checksum creation was improved to handle edge cases. The job dependencies and conditionals (needs and if) are correctly structured to prevent unnecessary builds. One minor observation: the old workflow had explicit tag→package.json version verification in the release step, which the new workflow skips (though it's less critical since tags are created from package.json, not received externally). The approach trades explicit verification for implicit safety through tag creation rather than tag receiving.
  • No files require special attention - changes are straightforward workflow consolidation with proper guardrails.

Important Files Changed

Filename Overview
.github/workflows/release.yml Merged server binary build and release pipeline into main release workflow. Adds output variables for server version/tag and conditional job execution based on whether @browserbasehq/stagehand-server was published. The workflow now detects server publication and creates tags/builds/publishes in a single orchestrated flow instead of relying on separate tag-triggered workflow. Comments added to Windows builds to clarify SDK package selection.

Sequence Diagram

sequenceDiagram
    participant GH as GitHub Push (main)
    participant Release as release job
    participant Detect as Detect server publish
    participant Tag as Tag creation
    participant Build as server_build_binaries job
    participant Publish as server_publish_release job

    GH->>Release: Push to main triggers
    Release->>Release: Run changesets/action
    Release->>Detect: Extract version from package.json
    Detect->>Detect: Check if server in publishedPackages
    Detect-->>Release: Output server_version, server_tag, server_published
    Release->>Tag: If server_published == 'true'
    Tag->>Tag: Create and push git tag
    Release-->>Build: Pass outputs to dependent job
    Build->>Build: Run if server_published == 'true'
    Build->>Build: Build binaries for all platforms
    Build-->>Publish: Upload artifacts
    Publish->>Publish: Run if server_published == 'true'
    Publish->>Publish: Download artifacts
    Publish->>Publish: Create release with assets

Loading

@monadoid monadoid merged commit 54e4dc5 into main Dec 23, 2025
21 checks passed
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.

3 participants