From 3bb064be1e89a409e22be72b0b6e2fb23ad87f26 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sun, 2 Jul 2023 20:14:57 -0400 Subject: [PATCH] We can't hash the unsigned installer for winget --- .github/workflows/ci-pipeline.yml | 8 +------- build/package/winget/push_manifest.ps1 | 16 +++++++++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 4d869f8a0f..0e8e3bfe0c 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -1534,15 +1534,9 @@ jobs: - name: Build ReleaseNotes run: dotnet build -c Release tools/ReleaseNotes - - name: Retrieve Installer .exe - uses: actions/download-artifact@v3 - with: - name: packaging-windows - path: packaging-windows - - name: Execute Push Script shell: powershell - run: build/package/winget/push_manifest.ps1 -InstallerPath packaging-windows/tgstation-server-installer.exe + run: build/package/winget/push_manifest.ps1 - name: Run ReleaseNotes with --link-winget run: dotnet run -c Release --no-build --project tools/ReleaseNotes --link-winget ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/build/package/winget/push_manifest.ps1 b/build/package/winget/push_manifest.ps1 index ff182010ff..12b4135771 100644 --- a/build/package/winget/push_manifest.ps1 +++ b/build/package/winget/push_manifest.ps1 @@ -1,14 +1,20 @@ -param( - [string]$InstallerPath = 'build/package/winget/Tgstation.Server.Host.Service.Wix.Bundle/x86/Release/tgstation-server-installer.exe' -) - $ErrorActionPreference="Stop" [XML]$versionXML = Get-Content build/Version.props -ErrorAction Stop $tgsVersion = $versionXML.Project.PropertyGroup.TgsCoreVersion -$installerHash = Get-FileHash -Path $InstallerPath -ErrorAction Stop # SHA256 is the default +mkdir artifacts +$previousProgressPreference = $ProgressPreference +$ProgressPreference = 'SilentlyContinue' +try +{ + Invoke-WebRequest -Uri "https://github.com/tgstation/tgstation-server/releases/download/tgstation-server-v$tgsVersion/tgstation-server-installer.exe" -OutFile "artifacts/tgstation-server-installer.exe" +} finally { + $ProgressPreference = $previousProgressPreference +} + +$installerHash = Get-FileHash -Path "artifacts/tgstation-server-installer.exe" -ErrorAction Stop # SHA256 is the default cd build/package/winget/manifest try