mirror of
https://github.com/Xevion/spotify-quickauth.git
synced 2025-12-06 11:16:30 -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:
|
jobs:
|
||||||
integration-windows:
|
integration-windows:
|
||||||
runs-on: windows-latest
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: windows-latest
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
name: 'Integration (${{ matrix.os }})'
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Run Integration
|
- name: Run Integration
|
||||||
run: iex (irm "https://raw.githubusercontent.com/Xevion/spotify-player-quickauth/refs/heads/master/run.ps1")
|
run: iex (irm "https://raw.githubusercontent.com/Xevion/spotify-player-quickauth/refs/heads/master/run.ps1")
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
integration-unix:
|
integration-unix:
|
||||||
strategy:
|
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"
|
$API_URL = "https://api.github.com/repos/$REPO/releases/latest"
|
||||||
|
|
||||||
try {
|
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 {
|
} catch {
|
||||||
Write-Host "Failed to fetch API response: $_"
|
Write-Host "Failed to fetch API response: $_"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user