From 057958c933a25f0ce3aaf3ed1d495358635e7c38 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Thu, 4 Jun 2026 19:23:26 -0400 Subject: [PATCH] ci: publish --- .github/workflows/publish.yml | 2 +- packages/cli/bin/lildax.cjs | 2 +- packages/cli/script/build.ts | 6 ++++-- packages/cli/script/publish.ts | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 083a0a9e8..99fbdd66e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -112,7 +112,7 @@ jobs: - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: opencode-preview-cli - path: packages/cli/dist/lildax-* + path: packages/cli/dist/cli-* outputs: version: ${{ needs.version.outputs.version }} diff --git a/packages/cli/bin/lildax.cjs b/packages/cli/bin/lildax.cjs index 1b84ed763..ab99b84b0 100644 --- a/packages/cli/bin/lildax.cjs +++ b/packages/cli/bin/lildax.cjs @@ -34,7 +34,7 @@ const scriptDir = path.dirname(fs.realpathSync(__filename)) const cached = path.join(scriptDir, ".lildax") const platform = { darwin: "darwin", linux: "linux", win32: "windows" }[os.platform()] || os.platform() const arch = { x64: "x64", arm64: "arm64", arm: "arm" }[os.arch()] || os.arch() -const base = "@opencode-ai/lildax-" + platform + "-" + arch +const base = "@opencode-ai/cli-" + platform + "-" + arch const binary = platform === "windows" ? "lildax.exe" : "lildax" function supportsAvx2() { diff --git a/packages/cli/script/build.ts b/packages/cli/script/build.ts index f91653c26..d6d8e9fcd 100755 --- a/packages/cli/script/build.ts +++ b/packages/cli/script/build.ts @@ -44,7 +44,7 @@ const targets = singleFlag : allTargets for (const item of targets) { - const name = [ + const target = [ binary, item.os === "win32" ? "windows" : item.os, item.arch, @@ -53,6 +53,7 @@ for (const item of targets) { ] .filter(Boolean) .join("-") + const name = target.replace(binary, "cli") console.log(`building ${name}`) const result = await Bun.build({ entrypoints: ["./src/index.ts"], @@ -67,7 +68,7 @@ for (const item of targets) { autoloadDotenv: false, autoloadTsconfig: true, autoloadPackageJson: true, - target: name.replace(binary, "bun") as Bun.Build.CompileTarget, + target: target.replace(binary, "bun") as Bun.Build.CompileTarget, outfile: `./dist/${name}/bin/${binary}`, execArgv: [`--user-agent=${binary}/${Script.version}`, "--use-system-ca", "--"], windows: {}, @@ -93,6 +94,7 @@ for (const item of targets) { name: `@opencode-ai/${name}`, version: Script.version, license: "MIT", + repository: { type: "git", url: "git+https://github.com/anomalyco/opencode.git" }, os: [item.os], cpu: [item.arch], }, diff --git a/packages/cli/script/publish.ts b/packages/cli/script/publish.ts index b828d9481..d2855413c 100755 --- a/packages/cli/script/publish.ts +++ b/packages/cli/script/publish.ts @@ -35,6 +35,7 @@ await Bun.file(`./dist/${pkg.name}/package.json`).write( bin: { lildax: "./bin/lildax" }, version, license: pkg.license, + repository: { type: "git", url: "git+https://github.com/anomalyco/opencode.git" }, os: ["darwin", "linux", "win32"], cpu: ["arm64", "x64"], optionalDependencies: binaries,