tui: set up for publishing via github actions (#8020)

This commit is contained in:
Alex Hancock
2026-03-23 13:21:20 -04:00
committed by GitHub
parent c493c6160c
commit 997f27ef33
39 changed files with 3143 additions and 7192 deletions
+9 -9
View File
@@ -13,11 +13,11 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
const require = createRequire(import.meta.url);
const PLATFORMS = {
"darwin-arm64": "@block/goose-acp-server-darwin-arm64",
"darwin-x64": "@block/goose-acp-server-darwin-x64",
"linux-arm64": "@block/goose-acp-server-linux-arm64",
"linux-x64": "@block/goose-acp-server-linux-x64",
"win32-x64": "@block/goose-acp-server-win32-x64",
"darwin-arm64": "@aaif/goose-acp-server-darwin-arm64",
"darwin-x64": "@aaif/goose-acp-server-darwin-x64",
"linux-arm64": "@aaif/goose-acp-server-linux-arm64",
"linux-x64": "@aaif/goose-acp-server-linux-x64",
"win32-x64": "@aaif/goose-acp-server-win32-x64",
};
const key = `${process.platform}-${process.arch}`;
@@ -25,7 +25,7 @@ const pkg = PLATFORMS[key];
if (!pkg) {
console.warn(
`@block/goose: no prebuilt goose-acp-server binary for ${key}. ` +
`@aaif/goose: no prebuilt goose-acp-server binary for ${key}. ` +
`You will need to provide a server URL manually with --server.`,
);
process.exit(0);
@@ -35,12 +35,12 @@ let binaryPath;
try {
// Resolve the package directory, then point at the binary inside it
const pkgDir = dirname(require.resolve(`${pkg}/package.json`));
const binName = process.platform === "win32" ? "goose.exe" : "goose";
const binName = process.platform === "win32" ? "goose-acp-server.exe" : "goose-acp-server";
binaryPath = join(pkgDir, "bin", binName);
} catch {
// The optional dependency wasn't installed (e.g. wrong platform). That's fine.
console.warn(
`@block/goose: optional dependency ${pkg} not installed. ` +
`@aaif/goose: optional dependency ${pkg} not installed. ` +
`You will need to provide a server URL manually with --server.`,
);
process.exit(0);
@@ -53,4 +53,4 @@ writeFileSync(
JSON.stringify({ binaryPath }, null, 2) + "\n",
);
console.log(`@block/goose: found native server binary at ${binaryPath}`);
console.log(`@aaif/goose: found native server binary at ${binaryPath}`);