fix: stabilize release changelog generation (#19987)

This commit is contained in:
Luke Parker 2026-03-30 14:37:02 +10:00 committed by GitHub
commit 6926fe1c74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 212 additions and 234 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()