From 7a4f63b22ae82f41125112c8d9a49dcbd503503d Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Thu, 29 Jan 2026 11:37:00 -0500 Subject: [PATCH] sync --- .github/workflows/publish.yml | 2 +- packages/script/src/index.ts | 4 ++++ script/publish.ts | 12 ++++++------ script/version.ts | 2 ++ 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3f26a3da67..3320be9521 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -261,7 +261,7 @@ jobs: - run: ./script/publish.ts env: OPENCODE_VERSION: ${{ needs.version.outputs.version }} - OPENCODE_RELEASE_ID: ${{ needs.version.outputs.release }} + OPENCODE_RELEASE: ${{ needs.version.outputs.release }} AUR_KEY: ${{ secrets.AUR_KEY }} GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }} OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} diff --git a/packages/script/src/index.ts b/packages/script/src/index.ts index e722ba5094..2d991ff0c3 100644 --- a/packages/script/src/index.ts +++ b/packages/script/src/index.ts @@ -20,6 +20,7 @@ const env = { OPENCODE_CHANNEL: process.env["OPENCODE_CHANNEL"], OPENCODE_BUMP: process.env["OPENCODE_BUMP"], OPENCODE_VERSION: process.env["OPENCODE_VERSION"], + OPENCODE_RELEASE: process.env["OPENCODE_RELEASE"], } const CHANNEL = await (async () => { if (env.OPENCODE_CHANNEL) return env.OPENCODE_CHANNEL @@ -55,5 +56,8 @@ export const Script = { get preview() { return IS_PREVIEW }, + get release() { + return env.OPENCODE_RELEASE + }, } console.log(`opencode script`, JSON.stringify(Script, null, 2)) diff --git a/script/publish.ts b/script/publish.ts index cdff5a06dc..105dcab72c 100755 --- a/script/publish.ts +++ b/script/publish.ts @@ -4,6 +4,10 @@ import { $ } from "bun" import { Script } from "@opencode-ai/script" import { buildNotes, getLatestRelease } from "./changelog" +if (!Script.release) { + throw new Error("Missing OPENCODE_RELEASE_ID environment variable") +} + const highlightsTemplate = `