Skip to content

Commit

Permalink
fix: get proper urls for current tag, regardless if it is "latest"
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Price <[email protected]>
  • Loading branch information
drpebcak committed Feb 23, 2024
1 parent 24746bc commit 118ea59
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ jobs:
Invoke-WebRequest -Uri 'https://aka.ms/wingetcreate/latest' -OutFile 'wingetcreate.exe'
- name: Create WinGet Package Update Pull Request
run: |
$latestRelease = Invoke-RestMethod -Uri https://api.github.com/repos/gptscript-ai/gptscript/releases/latest
$url = $latestRelease.assets | Where-Object { $_.name -eq ("gptscript-" + $latestRelease.tag_name + "-windows-amd64.zip") } | Select-Object -ExpandProperty browser_download_url
$url = "${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.ref_name }}/gptscript-${{ github.ref_name }}-windows-amd64.zip"
./wingetcreate.exe update --submit --token "${{ secrets.WINGET_GH_TOKEN }}" --urls $url --version "${{ github.ref_name }}" gptscript-ai.gptscript

0 comments on commit 118ea59

Please sign in to comment.