From 96e48936d7bcfa9191bbb80cfefceee4a43a35f7 Mon Sep 17 00:00:00 2001 From: Dave Simpson <45690499+davegarthsimpson@users.noreply.github.com> Date: Thu, 31 Oct 2024 13:18:06 +0100 Subject: [PATCH] use bail var in custom sign script --- .github/workflows/build.yml | 1 + electron-app/scripts/windowsCustomSign.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 865c0562e..6c85fd454 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -286,6 +286,7 @@ 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 }} + INTERNAL_ENABLE_WINDOWS_SIGNING: ${{ secrets.INTERNAL_ENABLE_WINDOWS_SIGNING }} strategy: matrix: config: ${{ fromJson(needs.select-targets.outputs.build-matrix) }} diff --git a/electron-app/scripts/windowsCustomSign.js b/electron-app/scripts/windowsCustomSign.js index 29fbc5fad..e09068491 100644 --- a/electron-app/scripts/windowsCustomSign.js +++ b/electron-app/scripts/windowsCustomSign.js @@ -1,7 +1,9 @@ const childProcess = require('child_process'); exports.default = async function (configuration) { - if (!process.env.GITHUB_ACTIONS) { + const enabled = !!process.env.INTERNAL_ENABLE_WINDOWS_SIGNING; + + if (!enabled || !process.env.GITHUB_ACTIONS) { return; }