Skip to content

ci: sign release binaries when signing secrets are configured - #154

Merged
nextestudios merged 4 commits into
mainfrom
feature/84-code-signing
Sep 27, 2026
Merged

nextestudios merged 4 commits into
mainfrom
feature/84-code-signing

Conversation

@nextestudios

Copy link
Copy Markdown
Owner

Summary

Code-signing plumbing for releases. The maintainer has no certificate yet, so releases stay unsigned until secrets are configured — nothing changes for the next release without them (the workflow only adds a warning).

  • build/CodeSigning.ps1: picks the provider from the configured variables — Microsoft Artifact Signing (formerly Trusted Signing; signtool /dlib, client package pinned by version + SHA-512, .NET 8 runtime installed only in that mode) or a .pfx (SIGNING_PFX_BASE64 + SIGNING_PFX_PASSWORD). Half a configuration fails the release instead of silently publishing unsigned. Secrets are removed from the process environment before dotnet publish/ISCC and only handed to signtool.
  • Publish-ControlFS.ps1 -Sign: signs ControlFS.exe before Inno Setup packages it, then the installer and the portable exe, all timestamped, before SHA256SUMS.txt and the update manifest are computed.
  • release.yml: new "Code signing mode" step (only tag builds are signed; manual dispatch builds never are), signing env passed only to the build step, and "Verify Authenticode signatures" (valid + timestamped, via Get-AuthenticodeSignature) after the launch smoke tests and before publishing. The job now uses the GitHub environment release so the maintainer can require manual approval and keep the signing secrets there.
  • Docs: docs/build-and-release.md → "Assinatura de código" (step-by-step for both options, approval setup), docs/CODE_SIGNING.md (both languages).

Tests

  • Validated once in the Smoke workflow on this branch with a temporary commit (reverted here) that created a self-signed code-signing cert trusted on the runner and ran Publish-ControlFS.ps1 -Sign: app exe, installer and portable were signed and timestamped, Assert-Authenticode passed, and the signed portable and installed app launched (run).
  • Mode detection (none / pfx / artifact / half-configured) checked locally with PowerShell 7; scripts parse cleanly.
  • Not verifiable here: signing with a real certificate / Artifact Signing account, SmartScreen reputation — needs the maintainer's credentials. The release workflow was not run (no tags pushed).

Refs #84

🤖 Generated with Claude Code

@nextestudios
nextestudios force-pushed the feature/84-code-signing branch from f5da9cd to 47536f8 Compare September 27, 2026 05:34
@nextestudios
nextestudios merged commit eddd5b2 into main Sep 27, 2026
1 check passed
@nextestudios
nextestudios deleted the feature/84-code-signing branch September 27, 2026 05:38
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