feat(desktop): publish v2 beta desktop - #41626
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the beta/release automation to build the beta branch from v2 (plus beta-labeled PRs targeting v2), publish beta desktop releases bundled with the same-run V2 CLI, and avoid unrelated automation (like Nix hash commits) mutating the generated beta branch.
Changes:
- Adjust beta sync to merge
beta-labeled PRs ontoorigin/v2, add a--preparemode, and serialize workflow runs before force-pushing. - Bundle the same-run V2 CLI into beta desktop artifacts and disable CLI autoupdate when launched from the desktop app.
- Update publish workflows to treat
betaas a desktop-only publish path (skip npm beta publication and legacy CLI artifacts).
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| script/publish.ts | Adds a OPENCODE_DESKTOP_ONLY gate to skip non-desktop package publishing during beta publishes. |
| script/beta.ts | Switches beta branch base to v2, adds --prepare mode, and emits changed output for workflows. |
| packages/desktop/src/main/background-cli.ts | Disables CLI autoupdate for background CLI invocations launched by the desktop app. |
| packages/desktop/scripts/utils.ts | Adds helper to copy the same-run built CLI into desktop resources and centralizes CLI preparation/signing. |
| packages/desktop/scripts/prebuild.ts | Uses same-run CLI bundling for beta builds while keeping dev behavior unchanged. |
| packages/desktop/electron-builder.config.ts | Bundles the CLI as an extra resource for non-prod (dev + beta) desktop builds. |
| packages/desktop/electron-builder.config.test.ts | Updates tests to assert CLI bundling for dev/beta and non-bundling for prod. |
| packages/cli/src/commands/handlers/service/start.ts | Ensures service start validates version compatibility (checkVersion: true). |
| .github/workflows/publish.yml | Adjusts publish pipeline to support beta desktop-only releases and consume same-run CLI artifacts for desktop packaging. |
| .github/workflows/nix-hashes.yml | Stops nix-hashes workflow from running on beta pushes to avoid mutating the generated branch. |
| .github/workflows/beta.yml | Runs beta sync from v2, serializes runs, and only creates/pushes with the App token when changes are detected. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
93
to
96
| - name: Build legacy CLI | ||
| if: github.ref_name != 'v2' | ||
| if: github.ref_name != 'v2' && github.ref_name != 'beta' | ||
| run: ./packages/opencode/script/build.ts ${{ (github.ref_name == 'beta' && '--sourcemaps') || '' }} | ||
| env: |
linghengqian
left a comment
There was a problem hiding this comment.
If I understand correctly, the documentation for opencode desktop v2 has not been recorded on https://opencode.ai/v2/docs ? Have I missed any issues?
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Merge before #41627.