From 4f8b9800a01d8599f334c1e6175e25f5b97a1d3d Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 16 Nov 2024 05:55:48 -0800 Subject: [PATCH] Remove redundant signing determination code from build system The "build" workflow signs the macOS and Windows builds of the application. The signing process relies on access to GitHub Actions secrets. For this reason, the workflow is configured to only sign the builds when it has access to GitHub Actions secrets to avoid spurious failures of the workflow that would otherwise be caused by signing failure. A flexible general purpose system for determining whether to attempt signing of a build was established years ago. However, a redundant system was added specific to the Windows build instead of using the existing system. The redundant system is hereby removed. This makes the workflow easier to understand and maintain. --- .github/workflows/build.yml | 1 - electron-app/scripts/windowsCustomSign.js | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 294284d4..b729931c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -290,7 +290,6 @@ jobs: SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe" WIN_CERT_PASSWORD: ${{ secrets[matrix.config.certificate-password-secret] }} WIN_CERT_CONTAINER_NAME: ${{ secrets[matrix.config.certificate-container] }} - WIN_SIGNING_ENABLED: ${{ secrets[matrix.config.certificate-password-secret] != '' }} strategy: matrix: diff --git a/electron-app/scripts/windowsCustomSign.js b/electron-app/scripts/windowsCustomSign.js index 41fc6d3b..5e9585bc 100644 --- a/electron-app/scripts/windowsCustomSign.js +++ b/electron-app/scripts/windowsCustomSign.js @@ -1,10 +1,7 @@ const childProcess = require('child_process'); exports.default = async function (configuration) { - if ( - !process.env.GITHUB_ACTIONS || - process.env.WIN_SIGNING_ENABLED !== 'true' - ) { + if (!process.env.GITHUB_ACTIONS || process.env.CAN_SIGN !== 'true') { return; }