From 553316af2a72ea57539dee933b2871db2bf03ef3 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Thu, 29 Jan 2026 21:19:00 -0500 Subject: [PATCH] ci --- .github/workflows/publish.yml | 2 +- packages/desktop/scripts/prepare.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9060eeb329..3924ad4914 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -145,7 +145,7 @@ jobs: cd packages/desktop bun ./scripts/prepare.ts env: - OPENCODE_VERSION: ${{ needs.publish.outputs.version }} + OPENCODE_VERSION: ${{ needs.version.outputs.version }} GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }} RUST_TARGET: ${{ matrix.settings.target }} GH_TOKEN: ${{ github.token }} diff --git a/packages/desktop/scripts/prepare.ts b/packages/desktop/scripts/prepare.ts index 24ff9e7e09..d909e76896 100755 --- a/packages/desktop/scripts/prepare.ts +++ b/packages/desktop/scripts/prepare.ts @@ -1,8 +1,14 @@ #!/usr/bin/env bun import { $ } from "bun" +import { Script } from "@opencode-ai/script" import { copyBinaryToSidecarFolder, getCurrentSidecar, windowsify } from "./utils" +const pkg = await Bun.file("../package.json").json() +pkg.version = Script.version +await Bun.write("../package.json", JSON.stringify(pkg, null, 2) + "\n") +console.log(`Updated package.json version to ${Script.version}`) + const sidecarConfig = getCurrentSidecar() const dir = "src-tauri/target/opencode-binaries"