GeezerVison is showing github.com — chore(release): publish the desktop app from beta (#55878) · abn/opencode@13263f3
File treeExpand file treeCollapse file tree Open diff view settings gui-extensions/src/updater
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/nix-hashes.yml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ permissions: | 6 | 6 | on: | 7 | 7 | workflow_dispatch: | 8 | 8 | push: | 9 | | - branches: [dev, beta] | | 9 | + branches: [dev] | 10 | 10 | paths: | 11 | 11 | - "bun.lock" | 12 | 12 | - "package.json" | |
Collapse file Copy file name to clipboardExpand all lines: .github/workflows/publish.yml +6-4Lines changed: 6 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -141,7 +141,8 @@ jobs: | 141 | 141 | sign-cli-macos: | 142 | 142 | needs: build-cli | 143 | 143 | runs-on: macos-26 | 144 | | - if: github.repository == 'anomalyco/opencode' | | 144 | + # Beta publishes only the desktop app, which signs the CLI it bundles. | | 145 | + if: github.repository == 'anomalyco/opencode' && github.ref_name != 'beta' | 145 | 146 | steps: | 146 | 147 | - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | 147 | 148 |
| @@ -196,7 +197,7 @@ jobs: | 196 | 197 | needs: version | 197 | 198 | runs-on: blacksmith-4vcpu-ubuntu-2404 | 198 | 199 | timeout-minutes: 30 | 199 | | - if: github.repository == 'anomalyco/opencode' && !(github.ref_name == 'dev' && (inputs.bump || inputs.version)) | | 200 | + if: github.repository == 'anomalyco/opencode' && github.ref_name != 'beta' && !(github.ref_name == 'dev' && (inputs.bump || inputs.version)) | 200 | 201 | steps: | 201 | 202 | - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | 202 | 203 |
| @@ -218,7 +219,7 @@ jobs: | 218 | 219 | needs: | 219 | 220 | - version | 220 | 221 | - build-node-app-archive | 221 | | - if: github.repository == 'anomalyco/opencode' && !(github.ref_name == 'dev' && (inputs.bump || inputs.version)) | | 222 | + if: github.repository == 'anomalyco/opencode' && github.ref_name != 'beta' && !(github.ref_name == 'dev' && (inputs.bump || inputs.version)) | 222 | 223 | strategy: | 223 | 224 | fail-fast: false | 224 | 225 | matrix: | @@ -276,7 +277,7 @@ jobs: | 276 | 277 | needs: | 277 | 278 | - sign-cli-macos | 278 | 279 | runs-on: blacksmith-4vcpu-windows-2025 | 279 | | - if: github.repository == 'anomalyco/opencode' && (github.ref_name == 'dev' || github.ref_name == 'beta') | | 280 | + if: github.repository == 'anomalyco/opencode' && github.ref_name == 'dev' | 280 | 281 | env: | 281 | 282 | AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | 282 | 283 | AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | @@ -591,6 +592,7 @@ jobs: | 591 | 592 | path: packages/opencode/dist | 592 | 593 |
| 593 | 594 | - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | | 595 | + if: github.ref_name != 'beta' | 594 | 596 | with: | 595 | 597 | name: opencode-preview-cli | 596 | 598 | path: packages/cli/dist | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/README.md +8-9Lines changed: 8 additions & 9 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -71,17 +71,16 @@ Environment options: | 71 | 71 |
| 72 | 72 | ## Deployment | 73 | 73 |
| 74 | | -The `deploy` GitHub Actions workflow uses SST to deploy the web app from these branches in `anomalyco/opencode`: | | 74 | +The `deploy` GitHub Actions workflow uses SST to deploy the web app to `beta.opencode.ai` on every push to the | | 75 | +`beta` branch in `anomalyco/opencode`. The `dev` and `production` stages do not deploy the web app. | 75 | 76 |
| 76 | | -| Branch | Site | | 77 | | -| ------------ | --------------------- | | 78 | | -| `dev` | `app.dev.opencode.ai` | | 79 | | -| `production` | `app.opencode.ai` | | 80 | | -| `beta` | `beta.opencode.ai` | | | 77 | +`beta` is the team's dogfooding branch: `dev` merged in by hand, plus commits pushed directly to it. Do not rebase or | | 78 | +force-push it. Each push also runs the `publish` workflow, which ships the same commit as the OpenCode Beta desktop app | | 79 | +(see `packages/desktop/README.md`). | 81 | 80 |
| 82 | | -Changes merged into `v2` reach the beta site when they are promoted to `beta`. The beta SST stage deploys | 83 | | -only the web app, using the same `WebApp` StaticSite definition as production. It sets the build channel | 84 | | -and Sentry environment to `beta` without deploying the API, console, database, or billing infrastructure. | | 81 | +The beta SST stage deploys only the web app, using the `WebApp` StaticSite definition in `infra/webapp.ts`. It sets | | 82 | +the build channel and Sentry environment to `beta` without deploying the API, console, database, or billing | | 83 | +infrastructure. | 85 | 84 |
| 86 | 85 | `VITE_OPENCODE_SERVER_MODE` controls which server the web build provides at startup: | 87 | 86 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/desktop/README.md +7Lines changed: 7 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -40,6 +40,13 @@ CLI preparation uses these channel rules: | 40 | 40 | default. `bun dev --download-server <version>` instead downloads that CLI version for local development. Neither path | 41 | 41 | requires `OPENCODE_CLI_DIST` or runs the production prebuild. | 42 | 42 |
| | 43 | +## Beta channel | | 44 | + | | 45 | +Every push to the `beta` branch publishes OpenCode Beta (`ai.opencode.desktop.beta`) as version `0.0.0-beta-<run>` to | | 46 | +the `beta` update channel. Beta publishes only the desktop app and `beta.opencode.ai`; the CLI and SDK packages ship | | 47 | +from `dev`. Install it from `https://opencode.ai/download/beta/<platform>`, for example `darwin-aarch64-dmg` or | | 48 | +`windows-x64-nsis`. Installed builds update in place on every platform. | | 49 | + | 43 | 50 | ## Startup benchmark | 44 | 51 |
| 45 | 52 | `bun run bench:startup` measures a **packaged** build from process spawn to the restored tab being ready and the | |
Collapse file Copy file name to clipboardExpand all lines: packages/gui-extensions/src/updater/main.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -105,7 +105,7 @@ const setup: MainSetup<typeof definition> = async (ctx) => { | 105 | 105 | after: "about", | 106 | 106 | enabled: () => enabled, | 107 | 107 | run(window) { | 108 | | - // Beta builds check in the focused window, which can offer the stable installer. | | 108 | + // Beta builds check in the focused window, which reports the result in-app. | 109 | 109 | if (build.channel !== "beta") return void runFork(show) | 110 | 110 |
| 111 | 111 | if (window) provider.emit("check", null, window.id) | |
Collapse file Copy file name to clipboardExpand all lines: packages/gui-extensions/src/updater/migration.test.ts -25Lines changed: 0 additions & 25 deletions Collapse file Copy file name to clipboardExpand all lines: packages/gui-extensions/src/updater/migration.ts -22Lines changed: 0 additions & 22 deletions Collapse file Copy file name to clipboardExpand all lines: packages/gui-extensions/src/updater/platform.ts +1-27Lines changed: 1 addition & 27 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -import { app, autoUpdater, shell } from "electron" | | 1 | +import { app, autoUpdater } from "electron" | 2 | 2 | import pkg from "electron-updater" | 3 | 3 | import { Effect } from "effect" | 4 | 4 | import type { Platform } from "./machine" | 5 | | -import { requiresStableMacInstaller, stableMacDownload } from "./migration" | 6 | 5 |
| 7 | 6 | const updateClient = pkg.autoUpdater | 8 | 7 |
| 9 | 8 | const restartTimeout = 10_000 | 10 | 9 |
| 11 | | -const stableArtifact = "https://opencode.ai/update/api/latest/desktop/opencode" | 12 | | - | 13 | 10 | export const make = Effect.fn("Updater.platform")(function* (channel: string) { | 14 | | - const external = requiresStableMacInstaller(process.platform, channel) | 15 | 11 | const userAgent = `opencode/${channel === "prod" ? "latest" : channel}/${app.getVersion()}/desktop` | 16 | 12 | const runFork = Effect.runForkWith(yield* Effect.context()) | 17 | 13 | updateClient.logger = { | @@ -36,17 +32,6 @@ export const make = Effect.fn("Updater.platform")(function* (channel: string) { | 36 | 32 | return { | 37 | 33 | checkForUpdate: Effect.tryPromise({ | 38 | 34 | try: async () => { | 39 | | - if (external) { | 40 | | - const response = await fetch(stableArtifact, { headers: { "User-Agent": userAgent } }) | 41 | | - | 42 | | - if (!response.ok) throw new Error(`Stable OpenCode update check failed: ${response.status}`) | 43 | | - const download = stableMacDownload(await response.json(), process.arch) | 44 | | - | 45 | | - if (!download) throw new Error("Stable OpenCode download is unavailable") | 46 | | - | 47 | | - return { mode: "external", ...download } as const | 48 | | - } | 49 | | - | 50 | 35 | const result = await updateClient.checkForUpdates() | 51 | 36 |
| 52 | 37 | if (!result?.isUpdateAvailable) return undefined | @@ -69,7 +54,6 @@ export const make = Effect.fn("Updater.platform")(function* (channel: string) { | 69 | 54 | }), | 70 | 55 | stageUpdate, | 71 | 56 | installAndRestart, | 72 | | - externalInstall: external ? openExternal : undefined, | 73 | 57 | } satisfies Platform | 74 | 58 | }) | 75 | 59 |
| @@ -147,13 +131,3 @@ const installAndRestart = Effect.callback<void, Error>((resume) => { | 147 | 131 | ), | 148 | 132 | }), | 149 | 133 | ) | 150 | | - | 151 | | -// Only web links leave the app; a failure to open one is not an install error. | 152 | | -function openExternal(url: string) { | 153 | | - if (!URL.canParse(url) || !["http:", "https:"].includes(new URL(url).protocol)) | 154 | | - return Effect.logWarning("blocked external target", { url }) | 155 | | - | 156 | | - return Effect.tryPromise(() => shell.openExternal(url)).pipe( | 157 | | - Effect.catch((error) => Effect.logError("failed to open external target", { url, error })), | 158 | | - ) | 159 | | -} |
Collapse file Copy file name to clipboardExpand all lines: script/publish.ts +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -10,6 +10,13 @@ const dir = fileURLToPath(new URL("..", import.meta.url)) | 10 | 10 | process.chdir(dir) | 11 | 11 | const tag = `v${Script.version}` | 12 | 12 |
| | 13 | +// Beta dogfoods the desktop app. The CLI and SDK packages ship from dev. | | 14 | +if (Script.channel === "beta") { | | 15 | + console.log("\n=== desktop ===\n") | | 16 | + await $`bun ./packages/desktop/scripts/publish.ts` | | 17 | + process.exit(0) | | 18 | +} | | 19 | + | 13 | 20 | const pkgjsons = await Array.fromAsync( | 14 | 21 | new Bun.Glob("**/package.json").scan({ | 15 | 22 | absolute: true, | |
|