Browse Source

build: re-enable self-cert codesigning on x64 macOS (#42576)

build: re-enable self-cert codesigning
Shelley Vohr 10 months ago
parent
commit
18abeb3add

+ 6 - 6
.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:

+ 1 - 1
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();