From d41990a610fdbea56b241e7a1c8b12df83c48e5e Mon Sep 17 00:00:00 2001 From: Taylor Price Date: Fri, 23 Feb 2024 13:23:29 -0700 Subject: [PATCH] fix: action is kicked off by tag push, not release Signed-off-by: Taylor Price --- .github/workflows/release.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index eec0ef83..ffbd882f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -40,9 +40,6 @@ 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 - ./wingetcreate.exe update --submit --token "${{ secrets.WINGET_GH_TOKEN }}" --urls $url --version "${{ github.event.release.tag_name }}" gptscript-ai.gptscript - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + $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 + ./wingetcreate.exe update --submit --token "${{ secrets.WINGET_GH_TOKEN }}" --urls $url --version "$latestRelease.tag_name" gptscript-ai.gptscript