From cf8f20fd1179c7f69bafbff835a153b8ad0db5b3 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sun, 2 Jul 2023 18:33:49 -0400 Subject: [PATCH] DO NOT CREATE SIGNED ARTIFACTS Delay Windows signing until TGS Deploy step --- .github/workflows/ci-pipeline.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index e287ec98a9..4b96da55be 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -1027,16 +1027,6 @@ jobs: cd build/package/winget/Tgstation.Server.Host.Service.Wix.Bundle dotnet build -c Release - - name: Sign Installer .exe - shell: powershell - run: | - $pfxBytes = [convert]::FromBase64String("${{ secrets.CODE_SIGNING_BASE64 }}") - [IO.File]::WriteAllBytes("tg_codesigning.pfx", $pfxBytes) - $certPassword = ConvertTo-SecureString -String "${{ secrets.CODE_SIGNING_PASSWORD }}" -Force -AsPlainText - $cert=Import-PfxCertificate -FilePath tg_codesigning.pfx -Cert Cert:\CurrentUser\My -Password $certPassword - rm tg_codesigning.pfx - Set-AuthenticodeSignature build/package/winget/Tgstation.Server.Host.Service.Wix.Bundle/bin/Release/tgstation-server-installer.exe -Certificate $cert -TimestampServer "http://timestamp.digicert.com" - - name: Test Install # Sanity checks the .deps.json exists, which the installation is broken without shell: powershell # If it's missing, I found that in elements were the problem run: | @@ -1360,6 +1350,17 @@ jobs: name: packaging-windows path: packaging-windows + - name: Sign Installer .exe + shell: powershell + run: | + $pfxBytes = [convert]::FromBase64String("${{ secrets.CODE_SIGNING_BASE64 }}") + [IO.File]::WriteAllBytes("tg_codesigning.pfx", $pfxBytes) + $certPassword = ConvertTo-SecureString -String "${{ secrets.CODE_SIGNING_PASSWORD }}" -Force -AsPlainText + $cert=Import-PfxCertificate -FilePath tg_codesigning.pfx -Cert Cert:\CurrentUser\My -Password $certPassword + Import-PfxCertificate -FilePath tg_codesigning.pfx -Cert Cert:\CurrentUser\Root -Password $certPassword + rm tg_codesigning.pfx + Set-AuthenticodeSignature packaging-windows/tgstation-server-installer.exe -Certificate $cert -TimestampServer "http://timestamp.digicert.com" + - name: Zip Artifacts shell: powershell run: |