build: use powershell for Electron build step (#49144)

This commit is contained in:
John Kleinschmidt
2025-12-08 16:03:40 -05:00
committed by GitHub
parent 95e87e46ab
commit 6e134a8ad9

View File

@@ -45,6 +45,7 @@ runs:
shell: bash
run: echo "::add-matcher::src/electron/.github/problem-matchers/clang.json"
- name: Build Electron ${{ inputs.step-suffix }}
if: ${{ inputs.target-platform != 'win' }}
shell: bash
run: |
rm -rf "src/out/Default/Electron Framework.framework"
@@ -70,14 +71,37 @@ runs:
# Upload build stats to Datadog
if ! [ -z $DD_API_KEY ]; then
if [ "$TARGET_PLATFORM" = "win" ]; then
npx node electron/script/build-stats.mjs out/Default/siso.exe.INFO --upload-stats || true
else
npx node electron/script/build-stats.mjs out/Default/siso.INFO --upload-stats || true
fi
npx node electron/script/build-stats.mjs out/Default/siso.INFO --upload-stats || true
else
echo "Skipping build-stats.mjs upload because DD_API_KEY is not set"
fi
- name: Build Electron (Windows) ${{ inputs.step-suffix }}
if: ${{ inputs.target-platform == 'win' }}
shell: powershell
run: |
cd src\electron
git pack-refs
cd ..
$env:NINJA_SUMMARIZE_BUILD = 1
if ("${{ inputs.is-release }}" -eq "true") {
e build --target electron:release_build
} else {
e build --target electron:testing_build
}
Copy-Item out\Default\.ninja_log out\electron_ninja_log
node electron\script\check-symlinks.js
# Upload build stats to Datadog
if ($env:DD_API_KEY) {
try {
npx node electron\script\build-stats.mjs out\Default\siso.exe.INFO --upload-stats
} catch {
Write-Host "Build stats upload failed, continuing..."
}
} else {
Write-Host "Skipping build-stats.mjs upload because DD_API_KEY is not set"
}
- name: Verify dist.zip ${{ inputs.step-suffix }}
shell: bash
run: |