From fe6abe8ade2d33b34a7859fb860b78537f0d7836 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Thu, 29 Jan 2026 11:51:17 -0500 Subject: [PATCH] sync --- .github/workflows/publish.yml | 1 + packages/opencode/script/build.ts | 18 ++++++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 916cf1ab2a..892a80a5d6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -70,6 +70,7 @@ jobs: env: OPENCODE_VERSION: ${{ needs.version.outputs.version }} OPENCODE_RELEASE: ${{ needs.version.outputs.release }} + GH_TOKEN: ${{ github.token }} - uses: actions/upload-artifact@v4 with: diff --git a/packages/opencode/script/build.ts b/packages/opencode/script/build.ts index 982fd6e597..0e2ac4f21a 100755 --- a/packages/opencode/script/build.ts +++ b/packages/opencode/script/build.ts @@ -179,17 +179,15 @@ for (const item of targets) { binaries[name] = Script.version } -for (const key of Object.keys(binaries)) { - if (key.includes("linux")) { - await $`tar -czf ../../${key}.tar.gz *`.cwd(`dist/${key}/bin`) - } else { - await $`zip -r ../../${key}.zip *`.cwd(`dist/${key}/bin`) +if (Script.release) { + for (const key of Object.keys(binaries)) { + if (key.includes("linux")) { + await $`tar -czf ../../${key}.tar.gz *`.cwd(`dist/${key}/bin`) + } else { + await $`zip -r ../../${key}.zip *`.cwd(`dist/${key}/bin`) + } } + await $`gh release upload v${Script.release} ./dist/*.zip ./dist/*.tar.gz --clobber` } -if (!Script.release) { - throw new Error("Missing OPENCODE_RELEASE environment variable") -} - -await $`gh release upload v${Script.release} ./dist/*.zip ./dist/*.tar.gz --clobber` export { binaries }