feat(release): sign Windows installer via Azure Trusted Signing#694
Open
huntharo wants to merge 1 commit into
Open
feat(release): sign Windows installer via Azure Trusted Signing#694huntharo wants to merge 1 commit into
huntharo wants to merge 1 commit into
Conversation
Wire optional Authenticode signing for the Windows NSIS installer using Azure Trusted Signing (electron-builder 26 native support). Signed when configured, unsigned otherwise — so local/sandbox/label-gated builds keep working with no secrets. - release.mjs: resolveWindowsAzureSigning() reads WIN_AZURE_SIGN_* + AZURE_* env and, when complete, injects --config.win.azureSignOptions.* into the electron-builder --win invocation; otherwise builds UNSIGNED with a warning. - release.mjs: runChecked now uses a shell only for `pnpm` on Windows (the .cmd shim), not `node` — so args with spaces (the publisherName override) pass through intact. - release.yml: windows-package job passes the signing config (repo vars) + service-principal creds (secrets); empty -> unsigned. - docs/desktop-windows-signing.md: Azure Trusted Signing setup runbook (eligibility, account/profile, service principal + Signer role, repo vars/secrets, verification). PR-label installer builds intentionally stay unsigned (secrets not exposed to PR validation). Publishing the signed installer to the GitHub Release is a follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Adds optional Authenticode signing for the Windows NSIS installer using
Azure Trusted Signing (electron-builder 26's native cloud-signing support) —
no hardware token, GitHub-hosted-runner friendly, removes the SmartScreen
"unknown publisher" warning. Follow-up to the Windows port (#670), which shipped
the installer unsigned.
Signed-when-configured, unsigned-otherwise — degrades gracefully so local,
sandbox, and label-gated PR builds keep working with no secrets.
Changes
release.mjs:resolveWindowsAzureSigning()readsWIN_AZURE_SIGN_*(config)AZURE_TENANT_ID/CLIENT_ID/CLIENT_SECRET(service-principal creds, read byelectron-builder's bundled
TrustedSigningmodule). When all present, injects--config.win.azureSignOptions.{publisherName,endpoint,codeSigningAccountName,certificateProfileName}into the
--winelectron-builder invocation; otherwise builds unsignedwith a clear warning.
release.mjs:runCheckeduses a shell only forpnpmon Windows (the.cmdshim), not
node— so thepublisherName=PwrDrvr LLCoverride (which has aspace) isn't word-split by
shell:true.release.yml(windows-package, release tags only): passes the signing configfrom repo variables and creds from repo secrets; empty → unsigned.
docs/desktop-windows-signing.md: setup runbook.Activation
No behavior change until configured. Once these are set, the next release tag
produces a signed installer:
WIN_AZURE_SIGN_PUBLISHER_NAME,WIN_AZURE_SIGN_ENDPOINT,WIN_AZURE_SIGN_ACCOUNT,WIN_AZURE_SIGN_PROFILEAZURE_TENANT_ID,AZURE_CLIENT_ID,AZURE_CLIENT_SECRETNotes
a US/Canada org 3+ yrs (or US/Canada individual, or EU/UK org) — see runbook.
ci:windows-package) stay unsigned bydesign (secrets aren't exposed to PR validation).
artifact) is a separate follow-up.
🤖 Generated with Claude Code