Skip to content

Commit 4f8b980

Browse files
committed
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.
1 parent f72d1f0 commit 4f8b980

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

.github/workflows/build.yml

-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ jobs:
290290
SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe"
291291
WIN_CERT_PASSWORD: ${{ secrets[matrix.config.certificate-password-secret] }}
292292
WIN_CERT_CONTAINER_NAME: ${{ secrets[matrix.config.certificate-container] }}
293-
WIN_SIGNING_ENABLED: ${{ secrets[matrix.config.certificate-password-secret] != '' }}
294293

295294
strategy:
296295
matrix:

electron-app/scripts/windowsCustomSign.js

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

33
exports.default = async function (configuration) {
4-
if (
5-
!process.env.GITHUB_ACTIONS ||
6-
process.env.WIN_SIGNING_ENABLED !== 'true'
7-
) {
4+
if (!process.env.GITHUB_ACTIONS || process.env.CAN_SIGN !== 'true') {
85
return;
96
}
107

0 commit comments

Comments
 (0)