Repository navigation
feat(desktop): publish v2 beta desktop - #41626
Conversation
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.
| - 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?
Summary
Merge before #41627.