ci: attempt to fix
All checks were successful
Queue Release Build / prepare (push) Successful in 16s
Deploy Web Apps / deploy (push) Successful in 11m21s
Queue Release Build / build-linux (push) Successful in 25m31s
Queue Release Build / build-windows (push) Successful in 21m42s
Queue Release Build / finalize (push) Successful in 22s

This commit is contained in:
2026-04-12 17:34:35 +02:00
parent 878fd1c766
commit 315820d487
3 changed files with 18 additions and 14 deletions

View File

@@ -164,6 +164,8 @@ jobs:
run: |
$projectRoot = $PWD.ProviderPath
$electronBuilderWorkspace = Join-Path $env:TEMP ([guid]::NewGuid().ToString('N'))
$electronBuilderCache = Join-Path $electronBuilderWorkspace 'electron-builder-cache'
$electronCache = Join-Path $electronBuilderWorkspace 'electron-cache'
$locationPushed = $false
function Invoke-RoboCopy {
@@ -183,27 +185,21 @@ jobs:
# electron-builder rejects junction-backed files during asar creation
# 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'
New-Item -ItemType Directory -Path $electronBuilderCache | Out-Null
New-Item -ItemType Directory -Path $electronCache | Out-Null
$env:ELECTRON_BUILDER_CACHE = $electronBuilderCache
$env:ELECTRON_CACHE = $electronCache
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')
Invoke-RoboCopy (Join-Path $projectRoot 'node_modules') (Join-Path $electronBuilderWorkspace 'node_modules')
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
npx electron-builder --win --publish never
if ($LASTEXITCODE -ne 0) {
throw "electron-builder failed with exit code $LASTEXITCODE"
}