mirror of
https://github.com/Xevion/spotify-quickauth.git
synced 2026-01-31 06:26:08 -06:00
Add Bearer header for powershell script, make windows job match unix
This commit is contained in:
@@ -29,7 +29,12 @@ $REPO = "Xevion/spotify-player-quickauth"
|
||||
$API_URL = "https://api.github.com/repos/$REPO/releases/latest"
|
||||
|
||||
try {
|
||||
$response = Invoke-RestMethod -Uri $API_URL
|
||||
$headers = @{}
|
||||
if ($env:GH_TOKEN) {
|
||||
$headers["Authorization"] = "Bearer $($env:GH_TOKEN)"
|
||||
}
|
||||
|
||||
$response = Invoke-RestMethod -Uri $API_URL -Method Get -Headers $headers
|
||||
} catch {
|
||||
Write-Host "Failed to fetch API response: $_"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user