Skip to content

infra: port .github/actions/windows-signing to Python (GEN-005 sweep) #2816

Closed

Description

@zackees

What

.github/actions/windows-signing/action.yaml still carries ten multi-line run: steps in PowerShell, so ci-lint precheck reports a GEN-005 approved exception for that path, and the three helper scripts beside it (Ensure-Location.ps1, Invoke-External.ps1, Logger.ps1) keep three more. The Python-port sweep has already taken the sibling composite actions — windows-patches (#2804/#2806), setup-macos-codesigning (#2794/#2795), qt-xml-validator (#2724), compatibility-validator (#2692), generate-docs, check-changes, run-swift-format (#2792) — and windows-signing is the largest one left.

Steps that carry a finding:

step what the block does
Extract Artifact Expand-Archive build\*.zip into build/, then delete the zips
Setup bouf gh release download the bouf v0.6.6 windows + nsis zips, compare both SHA-256 pins, extract to bin/ and nsis/
Install NSIS winget install -e --id NSIS.NSIS
Setup Google CNG Provider gh release download cng-v1.1 from GoogleCloudPlatform/kms-integrations, extract, find the .sig/.msi pair, verify the MSI with openssl dgst -sha384 -verify cng-release-signing-key.pem, then msiexec /i … /qn /norestart
Install rclone choco install rclone --version=1.69.3
Download Previous Build rclone copy ":gcs:obs-latest/<arch>/<channel>" into old_builds/
Sign Game Capture with RSA cert signtool sign /fd sha256 /t http://timestamp.digicert.com /f repo/.github/actions/windows-signing/prod-gc.crt /csp "Google Cloud KMS Provider" /kc <key> build/core/win-capture/data/*.dll
Run bouf bouf/bin/bouf.exe --config … --version … --branch … -i build -p old_builds -o output --packaging-only
Sync Latest Build rclone sync --delete-excluded old_builds back to :gcs:obs-latest/<arch>/<channel>
Upload Build to Archive rclone copy old_builds to :gcs:obs-builds/<arch>

Authenticate to Google Cloud stays a uses: step, and both upload steps stay uses: steps — only the shell blocks move.

Proposal

One PR, the same shape as #2806:

  1. ci/windows_signing.py — one subcommand per step (extract-artifact, setup-bouf, install-nsis, setup-cng, install-rclone, download-previous, sign-game-capture, run-bouf, sync-latest, upload-archive), each keeping its step's argv and exit status exactly. GH_TOKEN and the RCLONE_* variables stay in the action's env:, as they are today.
  2. action.yaml — every run: becomes one uv run --no-project --script ${{ github.workspace }}/ci/windows_signing.py <step> line with shell: bash, plus the pinned Set Up uv step first (with the save-cache / cache-suffix expressions the repo requires).
  3. Delete the three helper scripts this action alone used, and the four GEN-005 [[exceptions]] blocks in ci.toml for the path.

Scope note: this is a CI move, not a behaviour change — however the archive/upload paths and the signer arguments are hard-coded, so the RED test pins each argv against stubs on PATH (as ci/test_windows_patches.py does) before the port lands. No docs/features.md line (not user-visible).

Not verified here: the Windows-only tools (winget, msiexec, signtool, choco, rclone) are stubbed in the test; the first real proof is sign-windows.yaml in the nightly release.

Activity

  1. added
    infra
    ready
    on Oct 28, 2026
  2. zackees commented on Oct 28, 2026

    @zackees
    MemberAuthor

    Claiming: port .github/actions/windows-signing to Python (GEN-005 sweep)

    Plan, one PR:

    1. RED: ci/test_windows_signing.py pinning each step's argv and exit status against stubs on PATH, plus the action shape (one Python call per step, no shell: pwsh, Set Up uv first) and the absence of the path's ci.toml GEN-005 blocks.
    2. GREEN: ci/windows_signing.py with one subcommand per step; action.yaml rewritten to one uv run --no-project --script line per step; the three now-unused helper .ps1 files and their four ci.toml exceptions deleted.
    3. Verify with ./lint and the ci-lint precheck delta, then open the PR against master.

    First PR within this tick; the Windows-only tools stay stubbed until sign-windows.yaml runs in the nightly release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

infraready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions