Skip to content

Release job on plain electron-builder steps, publishing only from tags (#372) - #386

Merged
jtklein-agents merged 2 commits into
spec/370-electron-build-and-runtime-packages-currentfrom
372-release-job-on-plain-electron-builder-steps-publishing-only-from-tags
Nov 26, 2026
Merged

jtklein-agents merged 2 commits into
spec/370-electron-build-and-runtime-packages-currentfrom
372-release-job-on-plain-electron-builder-steps-publishing-only-from-tags

Conversation

@jtklein-agents

Copy link
Copy Markdown
Owner

Closes #372

Summary

The release job drops samuelmeuli/action-electron-builder@v1 for plain steps, and only a v* tag publishes.

 release (macos-15 | ubuntu-24.04 | windows-latest)
+  permissions: contents: write        # rest of build.yaml: contents: read
   yarn
   npm run download-binaries
-  samuelmeuli/action-electron-builder@v1   (release: tag ? true : false)
+  yarn build                                # SENTRY_*
+  [ -n "$CSC_LINK" ] || unset CSC_LINK CSC_KEY_PASSWORD   # shell: bash
+  yarn electron-builder --<mac|win|linux>
+    --publish  tag v* ? always : never
+    mac && tag v* ? -c.forceCodeSigning=true
+    env: GH_TOKEN = workflow token
+         CSC_LINK / CSC_KEY_PASSWORD = mac ? mac_certs : ''
+         APPLEID*, SENTRY_*  (as before)
 "mac": {
   "identity": "Johannes Klein (9VR92ZCXA8)",
+  "type": "distribution",
+  "notarize": false,

mac.notarize: false keeps electron-builder 26's built-in notarize off, so afterSign: ./scripts/notarize.js and its Developer ID + team 9VR92ZCXA8 guard stay the only notarize path. scripts/notarize.js is unchanged.

Does an empty CSC_LINK on Windows count as unset? Yes. In run 45802792960 the Windows job ran with CSC_LINK: '' and logged no code signing certificate configured, signing is skipped. windowsSignToolManager.js treats "" like null. macOS doesn't: with mac_certs empty, its chooseNotNull kept '' as a certificate path and failed with <repo> not a file. The old action only set CSC_LINK when the secret was non-empty, so the step now unsets empty CSC_* before running electron-builder.

Evidence

  • Before: on a branch push the action built and uploaded draft releases. It could publish a macOS app without a signing certificate.
    After: the branch push run 45804085610 passed lint and all three OSes. The repo still lists no releases or drafts:

    win    electron-builder --win --publish never    → no code signing certificate configured, signing is skipped
    mac    electron-builder --mac --publish never    → skipped macOS application code signing (no identity in keychain)
    linux  electron-builder --linux --publish never
    gh release list → (empty)
    
  • electron-builder schema check on the new build block: validateConfiguration(getConfig('.')) → schema ok.

  • yarn test: 67 files, 474 tests pass. yarn lint and yarn typecheck are clean.

Merge Danger

Door: two-way

Only CI config and two build.mac keys change. A revert brings the old action back.

Blast Radius: releases

  • A v* tag now publishes straight away. A macOS tag build fails without mac_certs.
  • The release job has contents: write on branch pushes too, because job permissions can't depend on the ref. --publish never keeps those builds from uploading anything.
  • None of this changes the app itself. The first tag build is the first real check of publishing.

🤖 Generated with Claude Code

jtklein-agents and others added 2 commits November 26, 2026 11:33
#372)

Replace samuelmeuli/action-electron-builder with `yarn build` and
`yarn electron-builder --<platform>` steps. Only a v* tag publishes; a
macOS tag build forces code signing. CSC_* come from mac_certs on macOS
only (empty elsewhere, which electron-builder treats as unset). The
workflow token is read-only except on the release job. mac.notarize is
off so the afterSign hook stays the one notarize path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
electron-builder treats an empty CSC_LINK on macOS as a certificate path
and fails with "not a file". The old action only set it when non-empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jtklein-agents
jtklein-agents merged commit e5ca35f into spec/370-electron-build-and-runtime-packages-current Nov 26, 2026
11 of 12 checks passed
@jtklein-agents
jtklein-agents deleted the 372-release-job-on-plain-electron-builder-steps-publishing-only-from-tags branch November 26, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant