ci: attempt to fix
Some checks failed
Queue Release Build / prepare (push) Successful in 13s
Deploy Web Apps / deploy (push) Successful in 10m22s
Queue Release Build / build-windows (push) Failing after 6m39s
Queue Release Build / finalize (push) Has been cancelled
Queue Release Build / build-linux (push) Has been cancelled
Some checks failed
Queue Release Build / prepare (push) Successful in 13s
Deploy Web Apps / deploy (push) Successful in 10m22s
Queue Release Build / build-windows (push) Failing after 6m39s
Queue Release Build / finalize (push) Has been cancelled
Queue Release Build / build-linux (push) Has been cancelled
This commit is contained in:
@@ -184,24 +184,69 @@ jobs:
|
||||
# because their resolved path sits outside the package root.
|
||||
New-Item -ItemType Directory -Path $electronBuilderWorkspace | Out-Null
|
||||
|
||||
# Point electron-builder at the Electron binary already present
|
||||
# in the main workspace so the packaging workspace can skip it.
|
||||
$env:ELECTRON_OVERRIDE_DIST_PATH = Join-Path $projectRoot 'node_modules\electron\dist'
|
||||
|
||||
try {
|
||||
Copy-Item -Path (Join-Path $projectRoot 'package.json') -Destination (Join-Path $electronBuilderWorkspace 'package.json') -Force
|
||||
Copy-Item -Path (Join-Path $projectRoot 'package-lock.json') -Destination (Join-Path $electronBuilderWorkspace 'package-lock.json') -Force
|
||||
Invoke-RoboCopy (Join-Path $projectRoot 'dist') (Join-Path $electronBuilderWorkspace 'dist')
|
||||
Invoke-RoboCopy (Join-Path $projectRoot 'images') (Join-Path $electronBuilderWorkspace 'images')
|
||||
|
||||
# Copy only the node_modules packages that electron-builder will
|
||||
# actually pack into the asar (see package.json "files" whitelist),
|
||||
# plus "electron" itself so electron-builder can resolve the version.
|
||||
$unscopedDeps = @(
|
||||
'ansi-regex','ansi-styles','ansis','app-root-path','applescript',
|
||||
'argparse','auto-launch','available-typed-arrays','balanced-match',
|
||||
'base64-js','brace-expansion','buffer','builder-util-runtime',
|
||||
'call-bind','call-bind-apply-helpers','call-bound','cliui',
|
||||
'concat-map','cross-spawn','dayjs','debug','dedent',
|
||||
'define-data-property','dotenv','dunder-proto','electron',
|
||||
'electron-updater','emoji-regex','es-define-property','es-errors',
|
||||
'es-object-atoms','escalade','for-each','foreground-child',
|
||||
'fs-extra','function-bind','get-caller-file','get-east-asian-width',
|
||||
'get-intrinsic','get-proto','glob','gopd','graceful-fs',
|
||||
'has-property-descriptors','has-symbols','has-tostringtag','hasown',
|
||||
'ieee754','inherits','is-callable','is-fullwidth-code-point',
|
||||
'is-typed-array','isarray','isexe','jackspeak','js-yaml','jsonfile',
|
||||
'lazy-val','lodash.escaperegexp','lodash.isequal','lru-cache',
|
||||
'math-intrinsics','minimatch','minimist','minipass','mkdirp','ms',
|
||||
'package-json-from-dist','path-is-absolute','path-key','path-scurry',
|
||||
'possible-typed-array-names','reflect-metadata','safe-buffer','sax',
|
||||
'semver','set-function-length','sha.js','shebang-command',
|
||||
'shebang-regex','signal-exit','sql-highlight','sql.js',
|
||||
'string-width','string-width-cjs','strip-ansi','strip-ansi-cjs',
|
||||
'tiny-typed-emitter','to-buffer','tslib','typed-array-buffer',
|
||||
'typeorm','universalify','untildify','uuid','which',
|
||||
'which-typed-array','winreg','wrap-ansi','wrap-ansi-cjs','y18n',
|
||||
'yallist','yargs','yargs-parser'
|
||||
)
|
||||
$scopedDeps = @(
|
||||
'@isaacs/cliui',
|
||||
'@pkgjs/parseargs',
|
||||
'@sqltools/formatter'
|
||||
)
|
||||
|
||||
$srcNM = Join-Path $projectRoot 'node_modules'
|
||||
$destNM = Join-Path $electronBuilderWorkspace 'node_modules'
|
||||
New-Item -ItemType Directory -Path $destNM -Force | Out-Null
|
||||
|
||||
foreach ($dep in $unscopedDeps) {
|
||||
$src = Join-Path $srcNM $dep
|
||||
if (Test-Path $src) {
|
||||
Invoke-RoboCopy $src (Join-Path $destNM $dep)
|
||||
}
|
||||
}
|
||||
foreach ($dep in $scopedDeps) {
|
||||
$src = Join-Path $srcNM $dep
|
||||
if (Test-Path $src) {
|
||||
$destDir = Join-Path $destNM $dep
|
||||
New-Item -ItemType Directory -Path (Split-Path $destDir) -Force | Out-Null
|
||||
Invoke-RoboCopy $src $destDir
|
||||
}
|
||||
}
|
||||
|
||||
Push-Location $electronBuilderWorkspace
|
||||
$locationPushed = $true
|
||||
|
||||
# Install only production dependencies — much faster than
|
||||
# mirroring the full node_modules tree via robocopy and also
|
||||
# avoids the junction/symlink issues that require the temp workspace.
|
||||
npm ci --omit=dev --ignore-scripts
|
||||
|
||||
$electronBuilderBin = Join-Path $projectRoot 'node_modules\.bin\electron-builder.cmd'
|
||||
& $electronBuilderBin --win --publish never
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
|
||||
Reference in New Issue
Block a user