Release v2.1.11
build-windows-exe / build (push) Failing after 9s

This commit is contained in:
2026-08-15 14:55:06 +01:00
parent 0d67a4eb25
commit ea283dd490
6 changed files with 506 additions and 1535 deletions
+28 -2
View File
@@ -1,6 +1,8 @@
const fs = require('fs');
const os = require('os');
const path = require('path');
const {exec} = require('pkg');
const {execFileSync} = require('child_process');
const esbuild = require('esbuild');
const {version: packageVersion} = require('../package.json');
function normalizeBuildVersion(value) {
@@ -14,9 +16,33 @@ async function main() {
fs.mkdirSync(distDir, {recursive: true});
}
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsa-sea-'));
const bundlePath = path.join(tempDir, 'index.cjs');
const seaBlobPath = path.join(tempDir, 'sea-prep.blob');
const seaConfigPath = path.join(tempDir, 'sea-config.json');
const buildVersion = normalizeBuildVersion(process.env.BUILD_VERSION);
const outputFile = path.join(distDir, `gSheets-Rate-Assistant-${buildVersion}.exe`);
await exec(['.', '--targets', 'latest-win-x64', '--output', outputFile]);
await esbuild.build({
entryPoints: [path.resolve(__dirname, '..', 'index.js')],
bundle: true,
platform: 'node',
format: 'cjs',
target: 'node26',
outfile: bundlePath,
logLevel: 'info',
});
fs.writeFileSync(seaConfigPath, JSON.stringify({
main: bundlePath,
output: outputFile,
mainFormat: 'commonjs',
disableExperimentalSEAWarning: true,
useCodeCache: false,
useSnapshot: false,
}, null, 2));
execFileSync(process.execPath, ['--build-sea', seaConfigPath], {stdio: 'inherit'});
}
main().catch(error => {