mirror of
https://github.com/anomalyco/opencode.git
synced 2026-02-01 22:48:16 +00:00
sync
This commit is contained in:
12
.github/workflows/publish.yml
vendored
12
.github/workflows/publish.yml
vendored
@@ -237,18 +237,6 @@ jobs:
|
||||
|
||||
- uses: ./.github/actions/setup-bun
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: opencode-cli
|
||||
path: packages/opencode/dist
|
||||
|
||||
- name: Make binaries executable
|
||||
run: |
|
||||
echo "Adding execute permissions to all binaries..."
|
||||
find packages/opencode/dist -type f \( -name "opencode" -o -name "opencode.exe" \) -exec chmod +x {} \;
|
||||
echo "Permissions after fix:"
|
||||
find packages/opencode/dist -type f -name "opencode" | head -3 | xargs ls -la
|
||||
|
||||
- name: Setup SSH for AUR
|
||||
run: |
|
||||
sudo apt-get update
|
||||
|
||||
@@ -15,6 +15,8 @@ process.chdir(dir)
|
||||
import pkg from "../package.json"
|
||||
import { Script } from "@opencode-ai/script"
|
||||
|
||||
console.log("release", Script.release)
|
||||
|
||||
// Fetch and generate models.dev snapshot
|
||||
const modelsData = process.env.MODELS_DEV_API_JSON
|
||||
? await Bun.file(process.env.MODELS_DEV_API_JSON).text()
|
||||
|
||||
@@ -15,12 +15,6 @@ for (const filepath of new Bun.Glob("*/package.json").scanSync({ cwd: "./dist" }
|
||||
console.log("binaries", binaries)
|
||||
const version = Object.values(binaries)[0]
|
||||
|
||||
{
|
||||
const name = `${pkg.name}-${process.platform}-${process.arch}`
|
||||
console.log(`smoke test: running dist/${name}/bin/opencode --version`)
|
||||
await $`./dist/${name}/bin/opencode --version`
|
||||
}
|
||||
|
||||
await $`mkdir -p ./dist/${pkg.name}`
|
||||
await $`cp -r ./bin ./dist/${pkg.name}/bin`
|
||||
await $`cp ./script/postinstall.mjs ./dist/${pkg.name}/postinstall.mjs`
|
||||
@@ -60,15 +54,6 @@ for (const tag of tags) {
|
||||
}
|
||||
|
||||
if (!Script.preview) {
|
||||
// Create archives for GitHub release
|
||||
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`)
|
||||
}
|
||||
}
|
||||
|
||||
const image = "ghcr.io/anomalyco/opencode"
|
||||
const platforms = "linux/amd64,linux/arm64"
|
||||
const tags = [`${image}:${version}`, `${image}:latest`]
|
||||
|
||||
@@ -79,7 +79,6 @@ await $`gh release edit ${Script.release} --draft --title "v${Script.version}" -
|
||||
|
||||
console.log("\n=== cli ===\n")
|
||||
await import(`../packages/opencode/script/publish.ts`)
|
||||
await $`gh release upload v${Script.release} ./packages/opencode/dist/*.zip ./packages/opencode/dist/*.tar.gz --clobber`
|
||||
|
||||
console.log("\n=== sdk ===\n")
|
||||
await import(`../packages/sdk/js/script/publish.ts`)
|
||||
|
||||
Reference in New Issue
Block a user