GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ci(release): publish desktop on every dev commit (#59507) · ogrman/opencode@362e000

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github
    • release
      • plan-release.sh
      • publish-desktop.sh
      • sign-desktop-macos.sh
    • workflows
      • release-dry-run.yml
      • release.yml
  • packages
    • desktop
      • electron-builder.config.test.ts
      • electron-builder.config.ts
    • gui-plugins/src/updater
      • main.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/release/plan-release.sh‎

Copy file name to clipboardExpand all lines: .github/release/plan-release.sh
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# plan-release.sh: decides version, channel and npm dist-tag from the event, ref and dispatch inputs
33
# (INPUT_BUMP, INPUT_VERSION) only, and writes them to $GITHUB_OUTPUT. Nothing here reads repository files.
44
#
5-
# push or dispatch on dev -> dev 0.0.0-dev-<run> npm tag dev
5+
# push or dispatch on dev -> dev 0.0.0-dev-<run> npm tag dev, desktop
66
# dispatch on dev with bump/version -> latest x.y.z npm tag latest, releasers only
77
# push or dispatch on beta -> beta 0.0.0-beta-<run> desktop only
88
# pull_request -> pr 0.0.0-pr-<run> everything, dry run
@@ -58,7 +58,7 @@ fi
5858
# What each channel builds and publishes.
5959
case "$channel" in
6060
latest) npm_tag=latest cli=true desktop=true node=false release=true ;;
61-
dev) npm_tag=dev cli=true desktop=false node=true release=false ;;
61+
dev) npm_tag=dev cli=true desktop=true node=true release=false ;;
6262
beta) npm_tag="" cli=false desktop=true node=false release=false ;;
6363
pr) npm_tag=pr cli=true desktop=true node=true release=true ;;
6464
esac
Collapse file

‎.github/release/publish-desktop.sh‎

Copy file name to clipboardExpand all lines: .github/release/publish-desktop.sh
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ win=("$windows/opencode-desktop-win-arm64.exe" "$windows/opencode-desktop-win-x6
99
mac=("$macos/opencode-desktop-mac-arm64.zip" "$macos/opencode-desktop-mac-arm64.dmg" "$macos/opencode-desktop-mac-x64.zip" "$macos/opencode-desktop-mac-x64.dmg")
1010
linux=("$linux_x64/opencode-desktop-linux-x86_64.AppImage" "$linux_x64/opencode-desktop-linux-amd64.deb" "$linux_x64/opencode-desktop-linux-x86_64.rpm")
1111
linux_arm=("$linux_arm64/opencode-desktop-linux-arm64.AppImage" "$linux_arm64/opencode-desktop-linux-arm64.deb" "$linux_arm64/opencode-desktop-linux-aarch64.rpm")
12-
# Beta skips the .app.tar.gz, which only the retired Tauri updater feed read.
12+
# Dev and beta skip the .app.tar.gz, which only the retired Tauri updater feed read.
1313
bundles=()
14-
if [ "$OPENCODE_CHANNEL" != beta ]; then
15-
bundles=("$macos/opencode-desktop-mac-arm64.app.tar.gz" "$macos/opencode-desktop-mac-x64.app.tar.gz")
16-
fi
14+
case "$OPENCODE_CHANNEL" in
15+
dev | beta) ;;
16+
*) bundles=("$macos/opencode-desktop-mac-arm64.app.tar.gz" "$macos/opencode-desktop-mac-x64.app.tar.gz") ;;
17+
esac
1718

1819
feed() {
1920
for file in "$@"; do
Collapse file

‎.github/release/sign-desktop-macos.sh‎

Copy file name to clipboardExpand all lines: .github/release/sign-desktop-macos.sh
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env bash
22
# sign-desktop-macos.sh <out dir> <app tarball>...: signs each unsigned .app inside-out with hardened runtime,
33
# notarizes them in one submission, staples them, and only then builds opencode-desktop-mac-<arch>.{zip,dmg,app.tar.gz}
4-
# from the stapled apps. Dry runs sign ad-hoc and skip notarization. Beta trades larger files for faster packaging
5-
# (zip and dmg at zlib level 1) and skips the .app.tar.gz, which only the retired Tauri updater feed read.
4+
# from the stapled apps. Dry runs sign ad-hoc and skip notarization. Dev and beta trade larger files for faster
5+
# packaging (zip and dmg at zlib level 1) and skip the .app.tar.gz, which only the retired Tauri updater feed read.
66
# Notarization reads APPLE_API_KEY_CONTENT, APPLE_API_KEY_ID and APPLE_API_ISSUER.
77
. "$(dirname "$0")/lib.sh"
88

@@ -11,8 +11,9 @@ shift
1111
mkdir -p "$out"
1212
apps=$(mktemp -d)
1313
identity=- timestamp=--timestamp=none
14-
zip_level=() dmg_level=()
15-
if [ "$OPENCODE_CHANNEL" = beta ]; then zip_level=(--zlibCompressionLevel 1) dmg_level=(-imagekey zlib-level=1); fi
14+
zip_level=() dmg_level=() preview=false
15+
case "$OPENCODE_CHANNEL" in dev | beta) preview=true ;; esac
16+
if [ "$preview" = true ]; then zip_level=(--zlibCompressionLevel 1) dmg_level=(-imagekey zlib-level=1); fi
1617
if ! dry_run; then
1718
identity=$(security find-identity -v -p codesigning build.keychain | sed -n 's/.*"\(Developer ID Application:.*\)"/\1/p' | head -n 1)
1819
[ -n "$identity" ] || die "Developer ID Application identity not found"
@@ -82,6 +83,6 @@ for dir in "$apps"/*; do
8283
ditto "$app" "$staging/$name"
8384
ln -s /Applications "$staging/Applications"
8485
hdiutil create -volname "${name%.app}" -srcfolder "$staging" -fs HFS+ -format UDZO ${dmg_level[@]+"${dmg_level[@]}"} -ov "$out/opencode-desktop-mac-$arch.dmg"
85-
if [ "$OPENCODE_CHANNEL" = beta ]; then continue; fi
86+
if [ "$preview" = true ]; then continue; fi
8687
COPYFILE_DISABLE=1 tar --no-mac-metadata -czf "$out/opencode-desktop-mac-$arch.app.tar.gz" -C "$dir" "$name"
8788
done
Collapse file

‎.github/workflows/release-dry-run.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/release-dry-run.yml
+11-11Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@ jobs:
252252
path: dist/docker
253253

254254
# macOS and Windows pack an unsigned app; Linux packs the final AppImage, deb and rpm.
255-
# Beta packages macOS x64 on Apple Silicon and Windows arm64 on Blacksmith for speed. electron-builder's afterPack
256-
# rejects a bundle whose CLI or node-pty does not match the target CPU.
255+
# Dev and beta package macOS x64 on Apple Silicon and Windows arm64 on Blacksmith for speed. electron-builder's
256+
# afterPack rejects a bundle whose CLI or node-pty does not match the target CPU.
257257
build-desktop:
258258
needs: [plan, tag, build-cli]
259259
if: needs.plan.outputs.desktop == 'true'
@@ -265,12 +265,12 @@ jobs:
265265
matrix:
266266
include:
267267
- target: darwin-x64
268-
host: ${{ github.ref_name == 'beta' && 'macos-26' || 'macos-26-intel' }}
269-
install: ${{ github.ref_name == 'beta' && '--os=darwin --cpu=*' || '--os=darwin --cpu=x64' }}
268+
host: ${{ (needs.plan.outputs.channel == 'dev' || needs.plan.outputs.channel == 'beta') && 'macos-26' || 'macos-26-intel' }}
269+
install: ${{ (needs.plan.outputs.channel == 'dev' || needs.plan.outputs.channel == 'beta') && '--os=darwin --cpu=*' || '--os=darwin --cpu=x64' }}
270270
- { target: darwin-arm64, host: macos-26, install: --os=darwin --cpu=arm64 }
271271
# github-hosted: blacksmith lacks the ARM64 MSVC cross-compilation toolchain
272272
- target: windows-arm64
273-
host: ${{ github.ref_name == 'beta' && 'blacksmith-4vcpu-windows-2025' || 'windows-2025' }}
273+
host: ${{ (needs.plan.outputs.channel == 'dev' || needs.plan.outputs.channel == 'beta') && 'blacksmith-4vcpu-windows-2025' || 'windows-2025' }}
274274
install: --cpu=*
275275
- { target: windows-x64, host: blacksmith-4vcpu-windows-2025 }
276276
- { target: linux-x64, host: blacksmith-4vcpu-ubuntu-2404 }
@@ -294,10 +294,10 @@ jobs:
294294
run: git fetch --no-tags --filter=blob:none --depth=300 origin "$SHA"
295295
env:
296296
SHA: ${{ needs.tag.outputs.sha }}
297-
# Beta trades larger packages for faster packaging. fpm sets XZ_OPT for the deb and rpm level, but xz still
298-
# reads XZ_DEFAULTS, so it uses every CPU.
299-
- name: Beta packaging settings
300-
if: needs.plan.outputs.channel == 'beta' && runner.os == 'Linux'
297+
# Dev and beta trade larger packages for faster packaging. fpm sets XZ_OPT for the deb and rpm level, but xz
298+
# still reads XZ_DEFAULTS, so it uses every CPU.
299+
- name: Preview packaging settings
300+
if: (needs.plan.outputs.channel == 'dev' || needs.plan.outputs.channel == 'beta') && runner.os == 'Linux'
301301
run: echo "XZ_DEFAULTS=-T0" >> "$GITHUB_ENV"
302302
- name: Build
303303
working-directory: packages/desktop
@@ -306,7 +306,7 @@ jobs:
306306
OPENCODE_TARGET: ${{ matrix.target }}
307307
NODE_OPTIONS: --max-old-space-size=4096
308308
VITE_SENTRY_DSN: ${{ vars.WEB_SENTRY_DSN }}
309-
VITE_SENTRY_ENVIRONMENT: ${{ needs.plan.outputs.channel == 'beta' && 'beta' || 'production' }}
309+
VITE_SENTRY_ENVIRONMENT: ${{ needs.plan.outputs.channel == 'latest' && 'production' || needs.plan.outputs.channel }}
310310
VITE_SENTRY_RELEASE: desktop@${{ needs.plan.outputs.version }}
311311
GITHUB_TOKEN: ${{ github.token }} # read-only; beta notes read pull request authors and descriptions
312312
- name: Pack
@@ -331,7 +331,7 @@ jobs:
331331
matrix:
332332
include:
333333
- target: windows-arm64
334-
host: ${{ github.ref_name == 'beta' && 'blacksmith-4vcpu-windows-2025' || 'windows-2025' }}
334+
host: ${{ (needs.plan.outputs.channel == 'dev' || needs.plan.outputs.channel == 'beta') && 'blacksmith-4vcpu-windows-2025' || 'windows-2025' }}
335335
install: --cpu=*
336336
- { target: windows-x64, host: blacksmith-4vcpu-windows-2025 }
337337
runs-on: ${{ matrix.host }}
Collapse file

‎.github/workflows/release.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/release.yml
+11-11Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ jobs:
271271
path: dist/docker
272272

273273
# macOS and Windows pack an unsigned app; Linux packs the final AppImage, deb and rpm.
274-
# Beta packages macOS x64 on Apple Silicon and Windows arm64 on Blacksmith for speed. electron-builder's afterPack
275-
# rejects a bundle whose CLI or node-pty does not match the target CPU.
274+
# Dev and beta package macOS x64 on Apple Silicon and Windows arm64 on Blacksmith for speed. electron-builder's
275+
# afterPack rejects a bundle whose CLI or node-pty does not match the target CPU.
276276
build-desktop:
277277
needs: [plan, tag, build-cli]
278278
if: needs.plan.outputs.desktop == 'true'
@@ -284,12 +284,12 @@ jobs:
284284
matrix:
285285
include:
286286
- target: darwin-x64
287-
host: ${{ github.ref_name == 'beta' && 'macos-26' || 'macos-26-intel' }}
288-
install: ${{ github.ref_name == 'beta' && '--os=darwin --cpu=*' || '--os=darwin --cpu=x64' }}
287+
host: ${{ (needs.plan.outputs.channel == 'dev' || needs.plan.outputs.channel == 'beta') && 'macos-26' || 'macos-26-intel' }}
288+
install: ${{ (needs.plan.outputs.channel == 'dev' || needs.plan.outputs.channel == 'beta') && '--os=darwin --cpu=*' || '--os=darwin --cpu=x64' }}
289289
- { target: darwin-arm64, host: macos-26, install: --os=darwin --cpu=arm64 }
290290
# github-hosted: blacksmith lacks the ARM64 MSVC cross-compilation toolchain
291291
- target: windows-arm64
292-
host: ${{ github.ref_name == 'beta' && 'blacksmith-4vcpu-windows-2025' || 'windows-2025' }}
292+
host: ${{ (needs.plan.outputs.channel == 'dev' || needs.plan.outputs.channel == 'beta') && 'blacksmith-4vcpu-windows-2025' || 'windows-2025' }}
293293
install: --cpu=*
294294
- { target: windows-x64, host: blacksmith-4vcpu-windows-2025 }
295295
- { target: linux-x64, host: blacksmith-4vcpu-ubuntu-2404 }
@@ -313,10 +313,10 @@ jobs:
313313
run: git fetch --no-tags --filter=blob:none --depth=300 origin "$SHA"
314314
env:
315315
SHA: ${{ needs.tag.outputs.sha }}
316-
# Beta trades larger packages for faster packaging. fpm sets XZ_OPT for the deb and rpm level, but xz still
317-
# reads XZ_DEFAULTS, so it uses every CPU.
318-
- name: Beta packaging settings
319-
if: needs.plan.outputs.channel == 'beta' && runner.os == 'Linux'
316+
# Dev and beta trade larger packages for faster packaging. fpm sets XZ_OPT for the deb and rpm level, but xz
317+
# still reads XZ_DEFAULTS, so it uses every CPU.
318+
- name: Preview packaging settings
319+
if: (needs.plan.outputs.channel == 'dev' || needs.plan.outputs.channel == 'beta') && runner.os == 'Linux'
320320
run: echo "XZ_DEFAULTS=-T0" >> "$GITHUB_ENV"
321321
- name: Build
322322
working-directory: packages/desktop
@@ -325,7 +325,7 @@ jobs:
325325
OPENCODE_TARGET: ${{ matrix.target }}
326326
NODE_OPTIONS: --max-old-space-size=4096
327327
VITE_SENTRY_DSN: ${{ vars.WEB_SENTRY_DSN }}
328-
VITE_SENTRY_ENVIRONMENT: ${{ needs.plan.outputs.channel == 'beta' && 'beta' || 'production' }}
328+
VITE_SENTRY_ENVIRONMENT: ${{ needs.plan.outputs.channel == 'latest' && 'production' || needs.plan.outputs.channel }}
329329
VITE_SENTRY_RELEASE: desktop@${{ needs.plan.outputs.version }}
330330
GITHUB_TOKEN: ${{ github.token }} # read-only; beta notes read pull request authors and descriptions
331331
- name: Pack
@@ -350,7 +350,7 @@ jobs:
350350
matrix:
351351
include:
352352
- target: windows-arm64
353-
host: ${{ github.ref_name == 'beta' && 'blacksmith-4vcpu-windows-2025' || 'windows-2025' }}
353+
host: ${{ (needs.plan.outputs.channel == 'dev' || needs.plan.outputs.channel == 'beta') && 'blacksmith-4vcpu-windows-2025' || 'windows-2025' }}
354354
install: --cpu=*
355355
- { target: windows-x64, host: blacksmith-4vcpu-windows-2025 }
356356
runs-on: ${{ matrix.host }}
Collapse file

‎packages/desktop/electron-builder.config.test.ts‎

Copy file name to clipboardExpand all lines: packages/desktop/electron-builder.config.test.ts
+10-4Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import { CLI_BINARIES, nodePtyPackage } from "./script/utils"
1313
const { FileMatcher } = createRequire(import.meta.resolve("electron-builder"))("app-builder-lib/out/fileMatcher")
1414

1515
const channels = [
16-
{ channel: "dev", appId: "ai.opencode.desktop.dev" },
17-
{ channel: "beta", appId: "ai.opencode.desktop.beta" },
18-
{ channel: "prod", appId: "ai.opencode.desktop" },
16+
{ channel: "dev", appId: "ai.opencode.desktop.dev", feed: "dev" },
17+
{ channel: "beta", appId: "ai.opencode.desktop.beta", feed: "beta" },
18+
{ channel: "prod", appId: "ai.opencode.desktop", feed: "latest" },
1919
] as const
2020

2121
function load(channel: string, target?: string): Configuration {
@@ -47,9 +47,15 @@ function trimFilter(dir: string, config: Configuration) {
4747
]).createFilter()
4848
}
4949

50-
test.each(channels)("channel identity for $channel", ({ channel, appId }) => {
50+
test.each(channels)("channel identity for $channel", ({ channel, appId, feed }) => {
5151
const config = load(channel)
5252
expect(config.appId).toBe(appId)
53+
// Every published channel updates from its own feed on the update service.
54+
expect(config.publish).toEqual({
55+
provider: "generic",
56+
url: `https://opencode.ai/update/api/${feed}/desktop/opencode/`,
57+
channel: "latest",
58+
})
5359
expect(config.extraMetadata?.desktopName).toBe(`${appId}.desktop`)
5460
// The executable must never end in `.desktop`: libappimage resolves the
5561
// AppImage's desktop entry by globbing `*.desktop`, and an ELF matching
Collapse file

‎packages/desktop/electron-builder.config.ts‎

Copy file name to clipboardExpand all lines: packages/desktop/electron-builder.config.ts
+14-6Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ const rpmNoBuildIdLinksFpm = "--rpm-rpmbuild-define=_build_id_links none"
2626
const metainfoFpm = (appId: string) =>
2727
`${path.join(packageDir, "resources", `${appId}.metainfo.xml`)}=/usr/share/metainfo/${appId}.metainfo.xml`
2828

29-
// Beta packages every commit for the team, so it trades about 5% (deb) and 17% (rpm) larger files for xz -1, which
29+
// Dev and beta package every commit, so they trade about 5% (deb) and 17% (rpm) larger files for xz -1, which
3030
// compresses the payload about 3x faster than the deb default (-3) and 5x faster than the rpm default (-9).
31-
const betaCompressionFpm = (target: "deb" | "rpm") => [`--${target}-compression-level`, "1"]
31+
const previewCompressionFpm = (target: "deb" | "rpm") => [`--${target}-compression-level`, "1"]
3232

3333
function resolveChannel() {
3434
const raw = process.env.OPENCODE_CHANNEL
@@ -207,8 +207,16 @@ export function getConfig() {
207207
...base,
208208
appId,
209209
productName: "OpenCode Dev",
210-
deb: { fpm: [metainfoFpm(appId)] },
211-
rpm: { packageName: "opencode-dev", fpm: [rpmNoBuildIdLinksFpm, metainfoFpm(appId)] },
210+
publish: {
211+
provider: "generic",
212+
url: "https://opencode.ai/update/api/dev/desktop/opencode/",
213+
channel: "latest",
214+
},
215+
deb: { fpm: [...previewCompressionFpm("deb"), metainfoFpm(appId)] },
216+
rpm: {
217+
packageName: "opencode-dev",
218+
fpm: [rpmNoBuildIdLinksFpm, ...previewCompressionFpm("rpm"), metainfoFpm(appId)],
219+
},
212220
}
213221
}
214222

@@ -223,10 +231,10 @@ export function getConfig() {
223231
url: "https://opencode.ai/update/api/beta/desktop/opencode/",
224232
channel: "latest",
225233
},
226-
deb: { fpm: [...betaCompressionFpm("deb"), metainfoFpm(appId)] },
234+
deb: { fpm: [...previewCompressionFpm("deb"), metainfoFpm(appId)] },
227235
rpm: {
228236
packageName: "opencode-beta",
229-
fpm: [rpmNoBuildIdLinksFpm, ...betaCompressionFpm("rpm"), metainfoFpm(appId)],
237+
fpm: [rpmNoBuildIdLinksFpm, ...previewCompressionFpm("rpm"), metainfoFpm(appId)],
230238
},
231239
}
232240
}
Collapse file

‎packages/gui-plugins/src/updater/main.ts‎

Copy file name to clipboardExpand all lines: packages/gui-plugins/src/updater/main.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const setup: Plugin.MainSetup = async (ctx) => {
1010
const builtin = builtinMainContext(ctx)
1111
const build = ctx.app
1212
const lifecycle = builtin.lifecycle
13-
const enabled = build.packaged && build.channel !== "dev"
13+
const enabled = build.packaged
1414
// Holds no resources, so it needs no cleanup.
1515
const context = logContext(ctx.log.write)
1616
const runPromise = Effect.runPromiseWith(context)
@@ -23,7 +23,7 @@ const setup: Plugin.MainSetup = async (ctx) => {
2323
from: { settings: "ready", file: "opencode.updater" },
2424
})
2525

26-
// electron-updater loads only in packaged builds that update, after the first window is up.
26+
// electron-updater loads only in packaged builds, after the first window is up.
2727
const platform = enabled
2828
? await import("./platform").then((module) => runPromise(module.make(build.channel)))
2929
: undefined

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.