Skip to content

ci: Sign Windows release builds with Azure Artifact Signing - #714

Merged
CoffeeFlux merged 1 commit into
masterfrom
ci/windows-signing
Oct 4, 2026
Merged

CoffeeFlux merged 1 commit into
masterfrom
ci/windows-signing

Conversation

@CoffeeFlux

@CoffeeFlux CoffeeFlux commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Signs the Windows release artifacts using Azure Artifact Signing.

How it works. Windows builds of v* tags hand their output to three jobs instead of uploading it directly:

  1. windows-sign-executable signs aegisub.exe.
  2. windows-package rebuilds the installer around the signed executable and swaps it into the portable zip. This reuses tools/win-installer-setup.ps1 with a new -NoBuild switch (there's no Meson build tree in that job; the build hands over the compiled translations, git_version.h, and installer-deps), plus a small replace-executable.ps1 for the zip.
  3. windows-sign-installer signs the installer.

Both signing jobs call the new reusable workflow .github/workflows/sign-windows.yml. The final artifacts keep their existing names (Windows MSVC Release - installer / - portable); intermediate ones are prefixed with Windows signing -.

Trust boundary. Only sign-windows.yml runs in the release environment and gets id-token: write. It doesn't check out or run any repository code: it downloads one artifact, checks it's a single .exe, signs it, verifies the signature, timestamp, and publisher, and uploads it. Its actions are pinned to commits, and the signing action's dependency cache is disabled. The build (including subprojects and tests) and packaging never have access to the signing identity.

Authentication. GitHub OIDC with a federated credential for repo:TypesettingTools/Aegisub:environment:release, so there are no stored secrets. The Azure identity only holds the signer role on the certificate profile. The environment only admits v* tags and ci/windows-signing (for testing). Its settings live in environment variables (AZURE_CLIENT_ID, AZURE_TENANT_ID, ARTIFACT_SIGNING_ENDPOINT, ARTIFACT_SIGNING_ACCOUNT, ARTIFACT_SIGNING_PROFILE, ARTIFACT_SIGNING_PUBLISHER).

Behavior changes. Non-release builds are unchanged, except that the workflow's GITHUB_TOKEN is now read-only, which nothing in it needed beyond. For release builds, the signed Windows artifacts are only produced if the whole build matrix succeeds.

Not covered: the Inno Setup uninstaller is still unsigned, and VSFilter is shipped as-is. Once merged, ci/windows-signing should be removed from the environment's allowed branches.

Windows builds of v* tags are signed using Azure Artifact Signing, with
an identity that only the release environment can use (through GitHub
OIDC, so there are no stored secrets).

The build never has access to that identity. Instead, release builds
hand their output to new jobs, which sign the executable, rebuild the
installer and portable zip around the signed copy, and then sign the
installer. Signing happens in a small reusable workflow,
sign-windows.yml, which doesn't check out or run any repository code
and checks the resulting signature and publisher.

Repackaging reuses win-installer-setup.ps1 (with a new -NoBuild switch,
as there is no Meson build tree) and a new script that swaps the signed
executable into the portable zip.

Builds that aren't signed are unchanged, apart from the workflow's
token now being read-only.

The ci/windows-signing branch is also allowed to sign so that the setup
can be tested with workflow_dispatch before a release.
@CoffeeFlux
CoffeeFlux merged commit 2d06e99 into master Oct 4, 2026
6 checks passed
@CoffeeFlux
CoffeeFlux deleted the ci/windows-signing branch October 4, 2026 21:34
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