ci: publish
This commit is contained in:
@@ -112,7 +112,7 @@ jobs:
|
|||||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: opencode-preview-cli
|
name: opencode-preview-cli
|
||||||
path: packages/cli/dist/lildax-*
|
path: packages/cli/dist/cli-*
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
version: ${{ needs.version.outputs.version }}
|
version: ${{ needs.version.outputs.version }}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const scriptDir = path.dirname(fs.realpathSync(__filename))
|
|||||||
const cached = path.join(scriptDir, ".lildax")
|
const cached = path.join(scriptDir, ".lildax")
|
||||||
const platform = { darwin: "darwin", linux: "linux", win32: "windows" }[os.platform()] || os.platform()
|
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 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"
|
const binary = platform === "windows" ? "lildax.exe" : "lildax"
|
||||||
|
|
||||||
function supportsAvx2() {
|
function supportsAvx2() {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ const targets = singleFlag
|
|||||||
: allTargets
|
: allTargets
|
||||||
|
|
||||||
for (const item of targets) {
|
for (const item of targets) {
|
||||||
const name = [
|
const target = [
|
||||||
binary,
|
binary,
|
||||||
item.os === "win32" ? "windows" : item.os,
|
item.os === "win32" ? "windows" : item.os,
|
||||||
item.arch,
|
item.arch,
|
||||||
@@ -53,6 +53,7 @@ for (const item of targets) {
|
|||||||
]
|
]
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.join("-")
|
.join("-")
|
||||||
|
const name = target.replace(binary, "cli")
|
||||||
console.log(`building ${name}`)
|
console.log(`building ${name}`)
|
||||||
const result = await Bun.build({
|
const result = await Bun.build({
|
||||||
entrypoints: ["./src/index.ts"],
|
entrypoints: ["./src/index.ts"],
|
||||||
@@ -67,7 +68,7 @@ for (const item of targets) {
|
|||||||
autoloadDotenv: false,
|
autoloadDotenv: false,
|
||||||
autoloadTsconfig: true,
|
autoloadTsconfig: true,
|
||||||
autoloadPackageJson: 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}`,
|
outfile: `./dist/${name}/bin/${binary}`,
|
||||||
execArgv: [`--user-agent=${binary}/${Script.version}`, "--use-system-ca", "--"],
|
execArgv: [`--user-agent=${binary}/${Script.version}`, "--use-system-ca", "--"],
|
||||||
windows: {},
|
windows: {},
|
||||||
@@ -93,6 +94,7 @@ for (const item of targets) {
|
|||||||
name: `@opencode-ai/${name}`,
|
name: `@opencode-ai/${name}`,
|
||||||
version: Script.version,
|
version: Script.version,
|
||||||
license: "MIT",
|
license: "MIT",
|
||||||
|
repository: { type: "git", url: "git+https://github.com/anomalyco/opencode.git" },
|
||||||
os: [item.os],
|
os: [item.os],
|
||||||
cpu: [item.arch],
|
cpu: [item.arch],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ await Bun.file(`./dist/${pkg.name}/package.json`).write(
|
|||||||
bin: { lildax: "./bin/lildax" },
|
bin: { lildax: "./bin/lildax" },
|
||||||
version,
|
version,
|
||||||
license: pkg.license,
|
license: pkg.license,
|
||||||
|
repository: { type: "git", url: "git+https://github.com/anomalyco/opencode.git" },
|
||||||
os: ["darwin", "linux", "win32"],
|
os: ["darwin", "linux", "win32"],
|
||||||
cpu: ["arm64", "x64"],
|
cpu: ["arm64", "x64"],
|
||||||
optionalDependencies: binaries,
|
optionalDependencies: binaries,
|
||||||
|
|||||||
Reference in New Issue
Block a user