diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 7b7f4e8..9a1c8bf 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -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: diff --git a/run.ps1 b/run.ps1 index aa14b60..9511f07 100644 --- a/run.ps1 +++ b/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