diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 32299c6..82768cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -111,6 +111,13 @@ jobs: run: | dotnet tool install --global wix --version 5.0.2 wix extension add -g WixToolset.Firewall.wixext/5.0.2 + # Built before the Azure sign-in: GitHub's OIDC token, which the Azure CLI uses for every + # new access token, expires five minutes after sign-in, and the build takes longer. + - name: Build + env: + # Fail rather than ship programs without the version information signing checks. + VEIL_REQUIRE_WINRES: "1" + run: ./packaging/windows/package.ps1 -BuildOnly # Azure Artifact Signing signs in with GitHub's OIDC token: the app registration's federated # credential accepts it only from the `release` environment, and there is no client secret. # Without AZURE_CLIENT_ID and AZURE_TENANT_ID (Azure not set up) the build stays unsigned and sign.ps1 says so. @@ -128,16 +135,14 @@ jobs: client-id: ${{ secrets.AZURE_CLIENT_ID }} tenant-id: ${{ secrets.AZURE_TENANT_ID }} allow-no-subscriptions: true - - name: Build, sign, package + - name: Sign, package env: WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }} WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} AZURE_SIGNING_ENDPOINT: ${{ secrets.AZURE_SIGNING_ENDPOINT }} AZURE_SIGNING_ACCOUNT: ${{ secrets.AZURE_SIGNING_ACCOUNT }} AZURE_CERT_PROFILE: ${{ secrets.AZURE_CERT_PROFILE }} - # Fail rather than ship programs without the version information signing checks. - VEIL_REQUIRE_WINRES: "1" - run: ./packaging/windows/package.ps1 + run: ./packaging/windows/package.ps1 -SkipBuild # SignPath Foundation (free code signing for open source): the unsigned MSI and zip go # up as a workflow artifact, SignPath signs every program inside them and the MSI # (packaging/windows/signpath-artifact-configuration.xml) after Jeremy approves the diff --git a/CHANGELOG.md b/CHANGELOG.md index b25f79e..5f124d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ All notable changes to Veil. Dates are dd/mm/yyyy. ### Changed +- **Windows packages are signed with Azure Artifact Signing**, so the installer and programs + carry a publisher signature. This release is the first to test it: if a package turns out + unsigned, the release notes say so. - **The updater and download links point at UCSLabs/veil**, where the project now lives. - A dev build shows a short dev label with its commit in the update row. - The invite on an empty stage is a quiet prompt that keeps the nearby code visible. diff --git a/packaging/windows/package.ps1 b/packaging/windows/package.ps1 index e2acce8..ec59b35 100644 --- a/packaging/windows/package.ps1 +++ b/packaging/windows/package.ps1 @@ -18,8 +18,9 @@ .EXAMPLE pwsh packaging/windows/package.ps1 pwsh packaging/windows/package.ps1 -SkipBuild + pwsh packaging/windows/package.ps1 -BuildOnly #> -param([switch] $SkipBuild) +param([switch] $SkipBuild, [switch] $BuildOnly) $ErrorActionPreference = 'Stop' $Root = (Resolve-Path (Join-Path $PSScriptRoot '..\..')).Path $Target = 'x86_64-pc-windows-msvc' @@ -49,6 +50,8 @@ if (-not $SkipBuild) { cargo build --release --locked -p veil-app -p veil-node -p veil-probe --target $Target --manifest-path (Join-Path $Root 'Cargo.toml') } } +# release.yml builds first, then signs in to Azure: the sign-in lasts only five minutes. +if ($BuildOnly) { return } $Bin = Join-Path $TargetDir "$Target\release" # PE headers: machine x64 (0x8664); the app is a window program (subsystem 2, no console