Skip to content

Commit 13b9408

Browse files
fix: disable local windows signing for forks PR
1 parent 3ccc864 commit 13b9408

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Diff for: .github/workflows/build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ jobs:
286286
SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe"
287287
WIN_CERT_PASSWORD: ${{ secrets.INSTALLER_CERT_WINDOWS_PASSWORD }}
288288
WIN_CERT_CONTAINER_NAME: ${{ secrets.INSTALLER_CERT_WINDOWS_CONTAINER }}
289+
WIN_SIGNING_ENABLED: ${{ !github.event.pull_request.head.repo.fork }}
290+
289291
strategy:
290292
matrix:
291293
config: ${{ fromJson(needs.select-targets.outputs.build-matrix) }}

Diff for: electron-app/scripts/windowsCustomSign.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
const childProcess = require('child_process');
22

33
exports.default = async function (configuration) {
4-
if (!process.env.GITHUB_ACTIONS) {
4+
console.log(
5+
'process.env.WIN_SIGNING_ENABLED',
6+
process.env.WIN_SIGNING_ENABLED
7+
);
8+
if (
9+
!process.env.GITHUB_ACTIONS ||
10+
process.env.WIN_SIGNING_ENABLED !== 'true'
11+
) {
512
return;
613
}
714

0 commit comments

Comments
 (0)