diff --git a/script/version.ts b/script/version.ts index c0846af91e97..5d69d222c17a 100755 --- a/script/version.ts +++ b/script/version.ts @@ -15,7 +15,9 @@ if (!Script.preview) { 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 --target ${sha} --title "v${Script.version}" --notes-file ${notesFile}` + // No --target: GitHub requires the workflows permission, which github.token can't have, when the target's + // workflow files differ from dev. The draft attaches to the tag script/publish.ts pushes. + 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}`)