Skip to content

Commit

Permalink
fix: disable local windows signing for forks PR
Browse files Browse the repository at this point in the history
Resolves #2545
  • Loading branch information
giacomocusinato committed Nov 11, 2024
1 parent 3ccc864 commit 63e9dfd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ jobs:
SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe"
WIN_CERT_PASSWORD: ${{ secrets.INSTALLER_CERT_WINDOWS_PASSWORD }}
WIN_CERT_CONTAINER_NAME: ${{ secrets.INSTALLER_CERT_WINDOWS_CONTAINER }}
WIN_SIGNING_ENABLED: ${{ !github.event.pull_request.head.repo.fork }}

strategy:
matrix:
config: ${{ fromJson(needs.select-targets.outputs.build-matrix) }}
Expand Down
5 changes: 4 additions & 1 deletion electron-app/scripts/windowsCustomSign.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const childProcess = require('child_process');

exports.default = async function (configuration) {
if (!process.env.GITHUB_ACTIONS) {
if (
!process.env.GITHUB_ACTIONS ||
process.env.WIN_SIGNING_ENABLED !== 'true'
) {
return;
}

Expand Down

0 comments on commit 63e9dfd

Please sign in to comment.