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 — desktop: add electron version (#15663) · danielcherubini/opencode@5cf235f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • publish.yml
  • bun.lock
  • package.json
  • packages
    • app/src
      • app.tsx
      • components
        • titlebar.tsx
      • pages
        • layout.tsx
      • utils
        • notification-click.test.ts
        • notification-click.ts
    • desktop-electron
      • .gitignore
      • AGENTS.md
      • README.md
      • electron-builder.config.ts
      • electron.vite.config.ts
      • icons
        • README.md
        • beta
          • 128x128.png
          • [email protected]
          • 32x32.png
          • 64x64.png
          • Square107x107Logo.png
          • Square142x142Logo.png
          • Square150x150Logo.png
          • Square284x284Logo.png
          • Square30x30Logo.png
          • Square310x310Logo.png
          • Square44x44Logo.png
          • Square71x71Logo.png
          • Square89x89Logo.png
          • StoreLogo.png
          • android
            • mipmap-anydpi-v26
              • ic_launcher.xml
            • mipmap-hdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • mipmap-mdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • mipmap-xhdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • mipmap-xxhdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • mipmap-xxxhdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • values
              • ic_launcher_background.xml
          • icon.icns
          • icon.ico
          • icon.png
          • ios
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
        • dev
          • 128x128.png
          • [email protected]
          • 32x32.png
          • 64x64.png
          • Square107x107Logo.png
          • Square142x142Logo.png
          • Square150x150Logo.png
          • Square284x284Logo.png
          • Square30x30Logo.png
          • Square310x310Logo.png
          • Square44x44Logo.png
          • Square71x71Logo.png
          • Square89x89Logo.png
          • StoreLogo.png
          • android
            • mipmap-anydpi-v26
              • ic_launcher.xml
            • mipmap-hdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • mipmap-mdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • mipmap-xhdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • mipmap-xxhdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • mipmap-xxxhdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • values
              • ic_launcher_background.xml
          • icon.icns
          • icon.ico
          • icon.png
          • ios
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
        • prod
          • 128x128.png
          • [email protected]
          • 32x32.png
          • 64x64.png
          • Square107x107Logo.png
          • Square142x142Logo.png
          • Square150x150Logo.png
          • Square284x284Logo.png
          • Square30x30Logo.png
          • Square310x310Logo.png
          • Square44x44Logo.png
          • Square71x71Logo.png
          • Square89x89Logo.png
          • StoreLogo.png
          • android
            • mipmap-anydpi-v26
              • ic_launcher.xml
            • mipmap-hdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • mipmap-mdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • mipmap-xhdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • mipmap-xxhdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • mipmap-xxxhdpi
              • ic_launcher.png
              • ic_launcher_foreground.png
              • ic_launcher_round.png
            • values
              • ic_launcher_background.xml
          • icon.icns
          • icon.ico
          • icon.png
          • ios
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
            • [email protected]
      • package.json
      • resources
        • entitlements.plist
      • scripts
        • copy-bundles.ts
        • copy-icons.ts
        • finalize-latest-yml.ts
        • predev.ts
        • prepare.ts
        • utils.ts
      • src
        • main
          • apps.ts
          • cli.ts
          • constants.ts
          • env.d.ts
          • index.ts
          • ipc.ts
          • logging.ts
          • markdown.ts
          • menu.ts
          • migrate.ts
          • server.ts
          • store.ts
          • windows.ts
        • preload
          • index.ts
          • types.ts
        • renderer
          • cli.ts
          • env.d.ts
          • i18n
            • ar.ts
            • br.ts
            • bs.ts
            • da.ts
            • de.ts
            • en.ts
            • es.ts
            • fr.ts
            • index.ts
            • ja.ts
            • ko.ts
            • no.ts
            • pl.ts
            • ru.ts
            • zh.ts
            • zht.ts
          • index.html
          • index.tsx
          • loading.html
          • loading.tsx
          • styles.css
          • updater.ts
          • webview-zoom.ts
      • sst-env.d.ts
      • tsconfig.json
    • ui
      • package.json
      • src/styles
        • base.css
  • script
    • publish.ts

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/publish.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/publish.yml
+126-1Lines changed: 126 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ jobs:
9999
with:
100100
name: opencode-cli
101101
path: packages/opencode/dist
102-
103102
outputs:
104103
version: ${{ needs.version.outputs.version }}
105104

@@ -240,11 +239,130 @@ jobs:
240239
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
241240
APPLE_API_KEY_PATH: ${{ runner.temp }}/apple-api-key.p8
242241

242+
build-electron:
243+
needs:
244+
- build-cli
245+
- version
246+
continue-on-error: false
247+
strategy:
248+
fail-fast: false
249+
matrix:
250+
settings:
251+
- host: macos-latest
252+
target: x86_64-apple-darwin
253+
platform_flag: --mac --x64
254+
- host: macos-latest
255+
target: aarch64-apple-darwin
256+
platform_flag: --mac --arm64
257+
- host: "blacksmith-4vcpu-windows-2025"
258+
target: x86_64-pc-windows-msvc
259+
platform_flag: --win
260+
- host: "blacksmith-4vcpu-ubuntu-2404"
261+
target: x86_64-unknown-linux-gnu
262+
platform_flag: --linux
263+
- host: "blacksmith-4vcpu-ubuntu-2404"
264+
target: aarch64-unknown-linux-gnu
265+
platform_flag: --linux
266+
runs-on: ${{ matrix.settings.host }}
267+
steps:
268+
- uses: actions/checkout@v3
269+
270+
- uses: apple-actions/import-codesign-certs@v2
271+
if: runner.os == 'macOS'
272+
with:
273+
keychain: build
274+
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
275+
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
276+
277+
- name: Setup Apple API Key
278+
if: runner.os == 'macOS'
279+
run: echo "${{ secrets.APPLE_API_KEY_PATH }}" > $RUNNER_TEMP/apple-api-key.p8
280+
281+
- uses: ./.github/actions/setup-bun
282+
283+
- uses: actions/setup-node@v4
284+
with:
285+
node-version: "24"
286+
287+
- name: Cache apt packages
288+
if: contains(matrix.settings.host, 'ubuntu')
289+
uses: actions/cache@v4
290+
with:
291+
path: ~/apt-cache
292+
key: ${{ runner.os }}-${{ matrix.settings.target }}-apt-electron-${{ hashFiles('.github/workflows/publish.yml') }}
293+
restore-keys: |
294+
${{ runner.os }}-${{ matrix.settings.target }}-apt-electron-
295+
296+
- name: Install dependencies (ubuntu only)
297+
if: contains(matrix.settings.host, 'ubuntu')
298+
run: |
299+
mkdir -p ~/apt-cache && chmod -R a+rw ~/apt-cache
300+
sudo apt-get update
301+
sudo apt-get install -y --no-install-recommends -o dir::cache::archives="$HOME/apt-cache" rpm
302+
sudo chmod -R a+rw ~/apt-cache
303+
304+
- name: Setup git committer
305+
id: committer
306+
uses: ./.github/actions/setup-git-committer
307+
with:
308+
opencode-app-id: ${{ vars.OPENCODE_APP_ID }}
309+
opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }}
310+
311+
- name: Prepare
312+
run: bun ./scripts/prepare.ts
313+
working-directory: packages/desktop-electron
314+
env:
315+
OPENCODE_VERSION: ${{ needs.version.outputs.version }}
316+
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
317+
RUST_TARGET: ${{ matrix.settings.target }}
318+
GH_TOKEN: ${{ github.token }}
319+
GITHUB_RUN_ID: ${{ github.run_id }}
320+
321+
- name: Build
322+
run: bun run build
323+
working-directory: packages/desktop-electron
324+
env:
325+
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
326+
327+
- name: Package and publish
328+
if: needs.version.outputs.release
329+
run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish always --config electron-builder.config.ts
330+
working-directory: packages/desktop-electron
331+
timeout-minutes: 60
332+
env:
333+
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
334+
GH_TOKEN: ${{ steps.committer.outputs.token }}
335+
CSC_LINK: ${{ secrets.APPLE_CERTIFICATE }}
336+
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
337+
APPLE_API_KEY: ${{ runner.temp }}/apple-api-key.p8
338+
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY }}
339+
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
340+
341+
- name: Package (no publish)
342+
if: ${{ !needs.version.outputs.release }}
343+
run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish never --config electron-builder.config.ts
344+
working-directory: packages/desktop-electron
345+
timeout-minutes: 60
346+
env:
347+
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
348+
349+
- uses: actions/upload-artifact@v4
350+
with:
351+
name: opencode-electron-${{ matrix.settings.target }}
352+
path: packages/desktop-electron/dist/*
353+
354+
- uses: actions/upload-artifact@v4
355+
if: needs.version.outputs.release
356+
with:
357+
name: latest-yml-${{ matrix.settings.target }}
358+
path: packages/desktop-electron/dist/latest*.yml
359+
243360
publish:
244361
needs:
245362
- version
246363
- build-cli
247364
- build-tauri
365+
- build-electron
248366
runs-on: blacksmith-4vcpu-ubuntu-2404
249367
steps:
250368
- uses: actions/checkout@v3
@@ -281,6 +399,12 @@ jobs:
281399
name: opencode-cli
282400
path: packages/opencode/dist
283401

402+
- uses: actions/download-artifact@v4
403+
if: needs.version.outputs.release
404+
with:
405+
pattern: latest-yml-*
406+
path: /tmp/latest-yml
407+
284408
- name: Cache apt packages (AUR)
285409
uses: actions/cache@v4
286410
with:
@@ -308,3 +432,4 @@ jobs:
308432
GITHUB_TOKEN: ${{ steps.committer.outputs.token }}
309433
GH_REPO: ${{ needs.version.outputs.repo }}
310434
NPM_CONFIG_PROVENANCE: false
435+
LATEST_YML_DIR: /tmp/latest-yml

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.