mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-04 11:46:38 +00:00
sync
This commit is contained in:
1
.github/workflows/publish.yml
vendored
1
.github/workflows/publish.yml
vendored
@@ -69,6 +69,7 @@ jobs:
|
|||||||
./packages/opencode/script/build.ts
|
./packages/opencode/script/build.ts
|
||||||
env:
|
env:
|
||||||
OPENCODE_VERSION: ${{ needs.version.outputs.version }}
|
OPENCODE_VERSION: ${{ needs.version.outputs.version }}
|
||||||
|
OPENCODE_RELEASE: ${{ needs.version.outputs.release }}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -179,4 +179,17 @@ for (const item of targets) {
|
|||||||
binaries[name] = Script.version
|
binaries[name] = Script.version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const key of Object.keys(binaries)) {
|
||||||
|
if (key.includes("linux")) {
|
||||||
|
await $`tar -czf ../../${key}.tar.gz *`.cwd(`dist/${key}/bin`)
|
||||||
|
} else {
|
||||||
|
await $`zip -r ../../${key}.zip *`.cwd(`dist/${key}/bin`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!Script.release) {
|
||||||
|
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 }
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ await $`gh release edit ${Script.release} --draft --title "v${Script.version}" -
|
|||||||
|
|
||||||
console.log("\n=== cli ===\n")
|
console.log("\n=== cli ===\n")
|
||||||
await import(`../packages/opencode/script/publish.ts`)
|
await import(`../packages/opencode/script/publish.ts`)
|
||||||
await $`gh release upload v${Script.version} ./packages/opencode/dist/*.zip ./packages/opencode/dist/*.tar.gz --clobber`
|
await $`gh release upload v${Script.release} ./packages/opencode/dist/*.zip ./packages/opencode/dist/*.tar.gz --clobber`
|
||||||
|
|
||||||
console.log("\n=== sdk ===\n")
|
console.log("\n=== sdk ===\n")
|
||||||
await import(`../packages/sdk/js/script/publish.ts`)
|
await import(`../packages/sdk/js/script/publish.ts`)
|
||||||
|
|||||||
Reference in New Issue
Block a user