fix: stabilize release changelog generation (#19987)

This commit is contained in:
Luke Parker
2026-03-30 14:37:02 +10:00
committed by GitHub
parent ee018d5c82
commit 6926fe1c74
4 changed files with 215 additions and 237 deletions

View File

@@ -6,7 +6,8 @@ import { $ } from "bun"
const output = [`version=${Script.version}`]
if (!Script.preview) {
await $`opencode run --command changelog`.cwd(process.cwd())
const sha = process.env.GITHUB_SHA ?? (await $`git rev-parse HEAD`.text()).trim()
await $`opencode run --command changelog -- --to ${sha}`.cwd(process.cwd())
const file = `${process.cwd()}/UPCOMING_CHANGELOG.md`
const body = await Bun.file(file)
.text()