diff --git a/.github/workflows/winget-publish.yml b/.github/workflows/winget-publish.yml index 378f9ccc..41ad131b 100644 --- a/.github/workflows/winget-publish.yml +++ b/.github/workflows/winget-publish.yml @@ -19,7 +19,9 @@ jobs: $wingetPackage = "2dust.v2rayN" $gitToken = "${{ secrets.PT_WINGET }}" - $github = Invoke-RestMethod -uri "https://api.github.com/repos/2dust/v2rayN/releases" + $headers = @{ Authorization = "Bearer $gitToken"; Accept = "application/vnd.github+json" } + + $github = Invoke-RestMethod -Uri "https://api.github.com/repos/2dust/v2rayN/releases" -Headers $headers $targetRelease = $github | Where-Object -Property prerelease -match 'False' | Select -First 1