[build] integrate scoped CLI publishing with GitHub Actions

This commit is contained in:
dijunkun
2026-10-30 17:48:57 +08:00
parent cf039b8f91
commit 7ce974f3d4
9 changed files with 396 additions and 18 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ const fs = require('node:fs');
const path = require('node:path');
const { spawn } = require('node:child_process');
const platforms = require('./platforms.json');
const { version } = require('../package.json');
const { name: launcherPackage, version } = require('../package.json');
function main() {
const target = `${process.platform}-${process.arch}`;
@@ -21,7 +21,7 @@ function main() {
try {
manifestPath = require.resolve(`${packageName}/package.json`);
} catch {
throw new Error(`Missing ${packageName}@${version}. Install with optional dependencies enabled; this platform's package must be published before crossdesk-cli.`);
throw new Error(`Missing ${packageName}@${version}. Install with optional dependencies enabled; this platform's package must be published before ${launcherPackage}.`);
}
if (require(manifestPath).version !== version) {
throw new Error(`Expected ${packageName}@${version}; reinstall matching package versions.`);