Add npm packaging and release workflow for yaakcli

This commit is contained in:
Gregory Schier
2026-02-22 09:21:46 -08:00
parent 3dd9f4c5b1
commit e0bf571ddd
22 changed files with 476 additions and 0 deletions

20
npm/cli/common.js Normal file
View File

@@ -0,0 +1,20 @@
const BINARY_DISTRIBUTION_PACKAGES = {
darwin_arm64: "@yaakapp/cli-darwin-arm64",
darwin_x64: "@yaakapp/cli-darwin-x64",
linux_arm64: "@yaakapp/cli-linux-arm64",
linux_x64: "@yaakapp/cli-linux-x64",
win32_x64: "@yaakapp/cli-win32-x64",
win32_arm64: "@yaakapp/cli-win32-arm64"
};
const BINARY_DISTRIBUTION_VERSION = require("./package.json").version;
const BINARY_NAME = process.platform === "win32" ? "yaakcli.exe" : "yaakcli";
const PLATFORM_SPECIFIC_PACKAGE_NAME =
BINARY_DISTRIBUTION_PACKAGES[`${process.platform}_${process.arch}`];
module.exports = {
BINARY_DISTRIBUTION_PACKAGES,
BINARY_DISTRIBUTION_VERSION,
BINARY_NAME,
PLATFORM_SPECIFIC_PACKAGE_NAME
};