From 2dcdce0ee49e672a0c26b8148b4d67b979fec3d1 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 6 Dec 2023 17:53:07 -0800 Subject: [PATCH] Try directly in the yaml --- .github/workflows/publish.yml | 5 ++++- Build/downgrade_nsis.ps1 | 17 +++-------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 43556d1f..f906de4e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -39,7 +39,10 @@ jobs: - name: Downgrade NSIS shell: pwsh - run: .\Build\downgrade_nsis.ps1 + run: | + Invoke-WebRequest https://netcologne.dl.sourceforge.net/project/nsis/NSIS%203/3.04/nsis-3.04-setup.exe -OutFile C:\WINDOWS\Temp\nsis-3.04-setup.exe + Invoke-Expression "& C:\WINDOWS\Temp\nsis-3.04-setup.exe /S" + makensis.exe /VERSION - name: Restore NuGet packages working-directory: ${{env.GITHUB_WORKSPACE}} diff --git a/Build/downgrade_nsis.ps1 b/Build/downgrade_nsis.ps1 index 52068490..2b9c1bcb 100644 --- a/Build/downgrade_nsis.ps1 +++ b/Build/downgrade_nsis.ps1 @@ -4,22 +4,11 @@ ################################################################################ $NsisVersion = "3.04" -$downloadUrl = "https://netcologne.dl.sourceforge.net/project/nsis/NSIS%203/${NsisVersion}/nsis-${NsisVersion}-setup.exe" -$downloadPath = "C:\WINDOWS\Temp\nsis-${NsisVersion}-setup.exe" - -Write-Host "Downloading NSIS version $NsisVersion" -$response = Invoke-WebRequest $downloadUrl -OutFile $downloadPath -PassThru -Write-Host "Downloaded $($response.BaseResponse.ContentLength) bytes" - -Write-Host "Installing NSIS version $NsisVersion" -$installOutput = Invoke-Expression "& $downloadPath /S 2>&1" -Write-Host "Install Output: $installOutput" +Invoke-WebRequest "https://netcologne.dl.sourceforge.net/project/nsis/NSIS%203/${NsisVersion}/nsis-${NsisVersion}-setup.exe" -OutFile "C:\WINDOWS\Temp\nsis-${NsisVersion}-setup.exe" +Invoke-Expression "& C:\WINDOWS\Temp\nsis-${NsisVersion}-setup.exe /S" $NsisPath = "${env:ProgramFiles(x86)}\NSIS\" -Write-Host "Adding NSIS to the PATH" Add-MachinePathItem $NsisPath $env:Path = Get-MachinePath -Write-Host "Checking NSIS version" -$versionOutput = makensis.exe /VERSION -Write-Host "NSIS Version: $versionOutput" \ No newline at end of file +makensis.exe /VERSION \ No newline at end of file