Skip to content

Commit 118ea59

Browse files
committed
fix: get proper urls for current tag, regardless if it is "latest"
Signed-off-by: Taylor Price <tayworm@gmail.com>
1 parent 24746bc commit 118ea59

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.github/workflows/release.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,5 @@ jobs:
4040
Invoke-WebRequest -Uri 'https://aka.ms/wingetcreate/latest' -OutFile 'wingetcreate.exe'
4141
- name: Create WinGet Package Update Pull Request
4242
run: |
43-
$latestRelease = Invoke-RestMethod -Uri https://api.github.com/repos/gptscript-ai/gptscript/releases/latest
44-
$url = $latestRelease.assets | Where-Object { $_.name -eq ("gptscript-" + $latestRelease.tag_name + "-windows-amd64.zip") } | Select-Object -ExpandProperty browser_download_url
43+
$url = "${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.ref_name }}/gptscript-${{ github.ref_name }}-windows-amd64.zip"
4544
./wingetcreate.exe update --submit --token "${{ secrets.WINGET_GH_TOKEN }}" --urls $url --version "${{ github.ref_name }}" gptscript-ai.gptscript

0 commit comments

Comments
 (0)