File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import { Script } from "@opencode-ai/script"
44import { $ } from "bun"
5- import { buildNotes , getLatestRelease } from "./changelog"
65
76const output = [ `version=${ Script . version } ` ]
87
98if ( ! Script . preview ) {
10- const previous = await getLatestRelease ( )
11- const notes = await buildNotes ( previous , "HEAD" )
12- const body = notes . join ( "\n" ) || "No notable changes"
9+ await $ `opencode run --command changelog` . cwd ( process . cwd ( ) )
10+ const file = `${ process . cwd ( ) } /UPCOMING_CHANGELOG.md`
11+ const body = await Bun . file ( file )
12+ . text ( )
13+ . catch ( ( ) => "No notable changes" )
1314 const dir = process . env . RUNNER_TEMP ?? "/tmp"
14- const file = `${ dir } /opencode-release-notes.txt`
15- await Bun . write ( file , body )
16- await $ `gh release create v${ Script . version } -d --title "v${ Script . version } " --notes-file ${ file } `
15+ const notesFile = `${ dir } /opencode-release-notes.txt`
16+ await Bun . write ( notesFile , body )
17+ await $ `gh release create v${ Script . version } -d --title "v${ Script . version } " --notes-file ${ notesFile } `
1718 const release = await $ `gh release view v${ Script . version } --json tagName,databaseId` . json ( )
1819 output . push ( `release=${ release . databaseId } ` )
1920 output . push ( `tag=${ release . tagName } ` )
You can’t perform that action at this time.
0 commit comments