This commit is contained in:
Dax Raad
2026-01-30 00:43:36 -05:00
parent 08f11f4da6
commit 5bef8e316a
3 changed files with 29 additions and 14 deletions

View File

@@ -2,12 +2,17 @@
import { Script } from "@opencode-ai/script"
import { $ } from "bun"
import { buildNotes, getLatestRelease } from "./changelog"
let output = [`version=${Script.version}`]
const output = [`version=${Script.version}`]
if (!Script.preview) {
await $`gh release create v${Script.version} -d --title "v${Script.version}" ${Script.preview ? "--prerelease" : ""}`
const release = await $`gh release view v${Script.version} --json id,tagName`.json()
const previous = await getLatestRelease(Script.version)
const notes = await buildNotes(previous, "HEAD")
const body = notes.join("\n") || "No notable changes"
await $`gh release edit v${Script.version} --draft=false --title "v${Script.version}" --notes ${body}`
output.push(`release=${release.id}`)
output.push(`tag=${release.tagName}`)
}