CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
37 lines
1.4 KiB
TypeScript
Executable File
37 lines
1.4 KiB
TypeScript
Executable File
#!/usr/bin/env bun
|
|
|
|
import { Script } from "@opencode-ai/script"
|
|
import { $ } from "bun"
|
|
|
|
const output = [`version=${Script.version}`]
|
|
|
|
if (!Script.preview) {
|
|
const sha = process.env.GITHUB_SHA ?? (await $`git rev-parse HEAD`.text()).trim()
|
|
await $`bun script/changelog.ts --to ${sha}`.cwd(process.cwd())
|
|
const file = `${process.cwd()}/UPCOMING_CHANGELOG.md`
|
|
const body = await Bun.file(file)
|
|
.text()
|
|
.catch(() => "No notable changes")
|
|
const dir = process.env.RUNNER_TEMP ?? "/tmp"
|
|
const notesFile = `${dir}/opencode-release-notes.txt`
|
|
await Bun.write(notesFile, body)
|
|
await $`gh release create v${Script.version} -d --title "v${Script.version}" --notes-file ${notesFile}`
|
|
const release = await $`gh release view v${Script.version} --json tagName,databaseId`.json()
|
|
output.push(`release=${release.databaseId}`)
|
|
output.push(`tag=${release.tagName}`)
|
|
} else if (Script.channel === "beta") {
|
|
await $`gh release create v${Script.version} -d --title "v${Script.version}" --repo ${process.env.GH_REPO}`
|
|
const release =
|
|
await $`gh release view v${Script.version} --json tagName,databaseId --repo ${process.env.GH_REPO}`.json()
|
|
output.push(`release=${release.databaseId}`)
|
|
output.push(`tag=${release.tagName}`)
|
|
}
|
|
|
|
output.push(`repo=${process.env.GH_REPO}`)
|
|
|
|
if (process.env.GITHUB_OUTPUT) {
|
|
await Bun.write(process.env.GITHUB_OUTPUT, output.join("\n"))
|
|
}
|
|
|
|
process.exit(0)
|