Skip to content

fix(ci): patch app-builder-lib keychain password for macOS signing - #3284

Merged
afonsojramos merged 1 commit into
mainfrom
fix/gitify-publish-failure
Sep 6, 2026
Merged

fix(ci): patch app-builder-lib keychain password for macOS signing#3284
afonsojramos merged 1 commit into
mainfrom
fix/gitify-publish-failure

Conversation

@afonsojramos

@afonsojramos afonsojramos commented Sep 6, 2026

Copy link
Copy Markdown
Member

Problem

The v7.8.0 macOS publish job failed in electron-builder's temporary-keychain setup, before signing started:

security set-key-partition-list -S apple-tool:,apple: -s -k *** <tmp>.keychain
security: SecKeychainUnlock: The user name or passphrase you entered is not correct.

Nothing changed on our side (no secrets, no workflow, no electron-builder version). The only difference from the v7.7.1 publish two days earlier is the macos-latest runner image:

Run macOS Runner image Result
v7.7.1 (Sep 4) 26.5.2 macos-26-arm64 20260728.0273 signed and published
v7.8.0 (Sep 6) 26.6.2 macos-26-arm64 20260831.0337 keychain error

Root cause

electron-builder 26.15.3 passes the .p12 import password (CSC_KEY_PASSWORD) to security set-key-partition-list -k, but that flag expects the temporary keychain's own randomly generated unlock password. Older macOS builds tolerated the mismatch because the keychain had just been unlocked; macOS 26.6 validates it and fails.

Upstream: electron-userland/electron-builder#10066, fixed by electron-userland/electron-builder#10101 (merged 2026-08-27). The fix is not in any stable release yet, including 26.16.0 (see electron-userland/electron-builder#10167).

Change

  • Add a pnpm patch for app-builder-lib@26.15.3 that mirrors PR #10101: pass keychainPassword through to importCerts and use it for set-key-partition-list -k.
  • Register it in pnpm-workspace.yaml (with a comment on when to drop it) and record the patch hash in pnpm-lock.yaml.

Windows and Linux packaging do not enter this code path.

Verification

  • Clean pnpm install --frozen-lockfile applies the patch; the installed macCodeSign.js in the pnpm store contains the fix.
  • vp fmt --check and vp lint pass.

After merge

Run the Publish workflow via workflow_dispatch on main with tag_name: v7.8.0. The v7.8.0 draft already exists with no assets; this will attach the signed artifacts, publish the release, and trigger the website deploy.

Follow-up: once electron-builder ships a 26.x release containing #10101, bump it and remove patches/app-builder-lib@26.15.3.patch.

@afonsojramos
afonsojramos requested a review from setchy as a code owner September 6, 2026 22:15
@github-actions github-actions Bot added bug Something isn't working dependency Dependency updates labels Sep 6, 2026
@afonsojramos
afonsojramos force-pushed the fix/gitify-publish-failure branch from b2c0756 to bbef29b Compare September 6, 2026 22:17
electron-builder 26.15.3 passes the .p12 import password to
`security set-key-partition-list -k`, which expects the temporary
keychain's own unlock password. Older macOS builds tolerated the mismatch
because the keychain had just been unlocked; the macOS 26.6 runner image
(macos-latest since 2026-09) validates it and fails with
"SecKeychainUnlock: The user name or passphrase you entered is not correct",
which broke the v7.8.0 macOS publish job.

Apply the upstream fix (electron-userland/electron-builder#10101) as a pnpm
patch until it ships in a 26.x release. Windows and Linux packaging do not
touch this code path.
@afonsojramos
afonsojramos force-pushed the fix/gitify-publish-failure branch from bbef29b to e0ed957 Compare September 6, 2026 22:18
@afonsojramos
afonsojramos merged commit aa5f25d into main Sep 6, 2026
18 checks passed
@afonsojramos
afonsojramos deleted the fix/gitify-publish-failure branch September 6, 2026 22:20
@github-actions github-actions Bot added this to the Release 7.x.x milestone Sep 6, 2026
@sonarqubecloud

sonarqubecloud Bot commented Sep 6, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dependency Dependency updates

Development

Successfully merging this pull request may close these issues.

1 participant