From 18abeb3add82eac62c72c39db2b4b87080bc69fb Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 19 Jun 2024 16:28:07 +0200 Subject: [PATCH] build: re-enable self-cert codesigning on x64 macOS (#42576) build: re-enable self-cert codesigning --- .github/workflows/pipeline-segment-electron-test.yml | 12 ++++++------ spec/lib/codesign-helpers.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pipeline-segment-electron-test.yml b/.github/workflows/pipeline-segment-electron-test.yml index a159ec96560..4767e4211d9 100644 --- a/.github/workflows/pipeline-segment-electron-test.yml +++ b/.github/workflows/pipeline-segment-electron-test.yml @@ -130,12 +130,12 @@ jobs: unzip -:o dist.zip unzip -:o chromedriver.zip unzip -:o mksnapshot.zip - # - name: Import & Trust Self-Signed Codesigning Cert on MacOS - # if: ${{ inputs.target-platform == 'macos' }} - # run: | - # sudo security authorizationdb write com.apple.trust-settings.admin allow - # cd src/electron - # ./script/codesign/generate-identity.sh + - name: Import & Trust Self-Signed Codesigning Cert on MacOS + if: ${{ inputs.target-platform == 'macos' && inputs.target-arch == 'x64' }} + run: | + sudo security authorizationdb write com.apple.trust-settings.admin allow + cd src/electron + ./script/codesign/generate-identity.sh - name: Run Electron Tests shell: bash env: diff --git a/spec/lib/codesign-helpers.ts b/spec/lib/codesign-helpers.ts index 6b0cf7c43b1..a78411b8867 100644 --- a/spec/lib/codesign-helpers.ts +++ b/spec/lib/codesign-helpers.ts @@ -8,7 +8,7 @@ const fixturesPath = path.resolve(__dirname, '..', 'fixtures'); export const shouldRunCodesignTests = process.platform === 'darwin' && - !process.env.CI && + !(process.env.CI && process.arch === 'arm64') && !process.mas && !features.isComponentBuild();