mirror of
https://github.com/Xevion/spotify-quickauth.git
synced 2025-12-06 09:16:32 -06:00
Add Bearer header for powershell script, make windows job match unix
This commit is contained in:
11
.github/workflows/integration.yaml
vendored
11
.github/workflows/integration.yaml
vendored
@@ -9,11 +9,20 @@ on:
|
||||
|
||||
jobs:
|
||||
integration-windows:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-latest
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: 'Integration (${{ matrix.os }})'
|
||||
|
||||
|
||||
steps:
|
||||
- name: Run Integration
|
||||
run: iex (irm "https://raw.githubusercontent.com/Xevion/spotify-player-quickauth/refs/heads/master/run.ps1")
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
integration-unix:
|
||||
strategy:
|
||||
|
||||
7
run.ps1
7
run.ps1
@@ -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