This commit is contained in:
Dax Raad
2026-01-29 11:51:17 -05:00
parent e9d7f42e64
commit da13e89286
2 changed files with 9 additions and 10 deletions

View File

@@ -70,6 +70,7 @@ jobs:
env: env:
OPENCODE_VERSION: ${{ needs.version.outputs.version }} OPENCODE_VERSION: ${{ needs.version.outputs.version }}
OPENCODE_RELEASE: ${{ needs.version.outputs.release }} OPENCODE_RELEASE: ${{ needs.version.outputs.release }}
GH_TOKEN: ${{ github.token }}
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:

View File

@@ -179,6 +179,7 @@ for (const item of targets) {
binaries[name] = Script.version binaries[name] = Script.version
} }
if (Script.release) {
for (const key of Object.keys(binaries)) { for (const key of Object.keys(binaries)) {
if (key.includes("linux")) { if (key.includes("linux")) {
await $`tar -czf ../../${key}.tar.gz *`.cwd(`dist/${key}/bin`) await $`tar -czf ../../${key}.tar.gz *`.cwd(`dist/${key}/bin`)
@@ -186,10 +187,7 @@ for (const key of Object.keys(binaries)) {
await $`zip -r ../../${key}.zip *`.cwd(`dist/${key}/bin`) await $`zip -r ../../${key}.zip *`.cwd(`dist/${key}/bin`)
} }
} }
if (!Script.release) { await $`gh release upload v${Script.release} ./dist/*.zip ./dist/*.tar.gz --clobber`
throw new Error("Missing OPENCODE_RELEASE environment variable")
} }
await $`gh release upload v${Script.release} ./dist/*.zip ./dist/*.tar.gz --clobber`
export { binaries } export { binaries }