mirror of
https://github.com/electron/electron.git
synced 2026-01-09 07:28:12 -05:00
build: use powershell for Electron build step (#49144)
This commit is contained in:
committed by
GitHub
parent
95e87e46ab
commit
6e134a8ad9
34
.github/actions/build-electron/action.yml
vendored
34
.github/actions/build-electron/action.yml
vendored
@@ -45,6 +45,7 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: echo "::add-matcher::src/electron/.github/problem-matchers/clang.json"
|
run: echo "::add-matcher::src/electron/.github/problem-matchers/clang.json"
|
||||||
- name: Build Electron ${{ inputs.step-suffix }}
|
- name: Build Electron ${{ inputs.step-suffix }}
|
||||||
|
if: ${{ inputs.target-platform != 'win' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
rm -rf "src/out/Default/Electron Framework.framework"
|
rm -rf "src/out/Default/Electron Framework.framework"
|
||||||
@@ -70,14 +71,37 @@ runs:
|
|||||||
|
|
||||||
# Upload build stats to Datadog
|
# Upload build stats to Datadog
|
||||||
if ! [ -z $DD_API_KEY ]; then
|
if ! [ -z $DD_API_KEY ]; then
|
||||||
if [ "$TARGET_PLATFORM" = "win" ]; then
|
npx node electron/script/build-stats.mjs out/Default/siso.INFO --upload-stats || true
|
||||||
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
|
|
||||||
else
|
else
|
||||||
echo "Skipping build-stats.mjs upload because DD_API_KEY is not set"
|
echo "Skipping build-stats.mjs upload because DD_API_KEY is not set"
|
||||||
fi
|
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 }}
|
- name: Verify dist.zip ${{ inputs.step-suffix }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user