From 06840f466bc621e043aef4c325e73e1e3dbb6386 Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Mon, 2 May 2022 10:42:44 -0700 Subject: [PATCH] Update package-submissions.yml --- .github/workflows/package-submissions.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package-submissions.yml b/.github/workflows/package-submissions.yml index 91f1877e63..23f7ab4265 100644 --- a/.github/workflows/package-submissions.yml +++ b/.github/workflows/package-submissions.yml @@ -19,9 +19,10 @@ jobs: $gitToken = {{ secrets.pt_WinGet }} $github = Invoke-RestMethod -uri "https://api.github.com/repos/Microsoft/PowerToys/releases" - $installerUrl = $github | Where-Object -Property name -match 'Release' | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'PowerToysSetup' | Select browser_download_url - $ver = $github.release.tag_name.Trim("v") + $targetRelease = $github | Where-Object -Property name -match 'Release'| Select -First 1 + $installerUrl = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'PowerToysSetup' | Select browser_download_url + $ver = $targetRelease.tag_name.Trim("v") # getting latest wingetcreate file iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe