From 264aaeee6423325e65e4701c5e81a85deb78182d Mon Sep 17 00:00:00 2001 From: David Sangrey Date: Thu, 31 Aug 2023 12:01:17 -0400 Subject: [PATCH] #1009 Force Latest Winsparkle for Builds --- .github/workflows/windows-build.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index eaf29244..695a9bbf 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -103,11 +103,18 @@ jobs: pip install wheel pip install -r requirements-dev.txt - - name: Download winsparkle + - name: Download latest WinSparkle release run: | - Invoke-Webrequest -UseBasicParsing https://github.com/vslavik/winsparkle/releases/download/v0.8.0/WinSparkle-0.8.0.zip -OutFile out.zip - Expand-Archive out.zip - Move-Item 'out\WinSparkle-0.8.0\Release\*' '.\' + $url = "https://api.github.com/repos/vslavik/winsparkle/releases/latest" + $response = Invoke-RestMethod -Uri $url + $latestAsset = $response.assets | Where-Object { $_.name -match "WinSparkle.*\.zip" -and $_.name -notmatch "-src" } + + $downloadUrl = $latestAsset.browser_download_url + Invoke-WebRequest -Uri $downloadUrl -OutFile WinSparkle-Latest.zip + + Expand-Archive -Path WinSparkle-Latest.zip -DestinationPath . + $extractedFolder = Get-ChildItem -Filter "WinSparkle-*" -Directory + Move-Item -Path "$($extractedFolder.FullName)\Release\*" -Destination . - name: Build EDMC run: |