diff options
| author | Luke Parker <[email protected]> | 2026-03-28 11:20:19 +1000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-28 11:20:19 +1000 |
| commit | 82fc493520925cb71323964bff6939e768e6d83a (patch) | |
| tree | cc6b2af2e2045f49857aeb6f5115a31e1801b19c /packages/desktop-electron/scripts | |
| parent | 2145d97f1866001f107214be2f0dce3353e2e87d (diff) | |
| download | opencode-82fc493520925cb71323964bff6939e768e6d83a.tar.gz opencode-82fc493520925cb71323964bff6939e768e6d83a.zip | |
feat(ci): use Azure Artifact Signing for Windows releases (#15201)
Diffstat (limited to 'packages/desktop-electron/scripts')
| -rwxr-xr-x | packages/desktop-electron/scripts/prepare.ts | 3 | ||||
| -rw-r--r-- | packages/desktop-electron/scripts/utils.ts | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/packages/desktop-electron/scripts/prepare.ts b/packages/desktop-electron/scripts/prepare.ts index 3764db921..3704b2e61 100755 --- a/packages/desktop-electron/scripts/prepare.ts +++ b/packages/desktop-electron/scripts/prepare.ts @@ -13,11 +13,12 @@ await Bun.write("./package.json", JSON.stringify(pkg, null, 2) + "\n") console.log(`Updated package.json version to ${Script.version}`) const sidecarConfig = getCurrentSidecar() +const artifact = process.env.OPENCODE_CLI_ARTIFACT ?? "opencode-cli" const dir = "resources/opencode-binaries" await $`mkdir -p ${dir}` -await $`gh run download ${Bun.env.GITHUB_RUN_ID} -n opencode-cli`.cwd(dir) +await $`gh run download ${process.env.GITHUB_RUN_ID} -n ${artifact}`.cwd(dir) await copyBinaryToSidecarFolder(windowsify(`${dir}/${sidecarConfig.ocBinary}/bin/opencode`)) diff --git a/packages/desktop-electron/scripts/utils.ts b/packages/desktop-electron/scripts/utils.ts index 1c0add87d..19b96b0a1 100644 --- a/packages/desktop-electron/scripts/utils.ts +++ b/packages/desktop-electron/scripts/utils.ts @@ -63,6 +63,9 @@ export async function copyBinaryToSidecarFolder(source: string) { await $`mkdir -p ${dir}` const dest = windowsify(`${dir}/opencode-cli`) await $`cp ${source} ${dest}` + if (process.platform === "win32" && process.env.GITHUB_ACTIONS === "true") { + await $`pwsh -NoLogo -NoProfile -ExecutionPolicy Bypass -File ../../script/sign-windows.ps1 ${dest}` + } if (process.platform === "darwin") await $`codesign --force --sign - ${dest}` console.log(`Copied ${source} to ${dest}`) |
