diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 2e9cc8f..4124ee0 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -6,6 +6,8 @@ on: workflows: ["Build"] types: - completed +env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: integration-windows: @@ -18,16 +20,11 @@ jobs: integration-unix: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, macos-13] + runs-on: ${{ matrix.os }} + name: 'Integration (${{ matrix.os }})' steps: - - name: Debug (MacOS) - if: matrix.os == 'macos-latest' - run: | - curl -s https://api.github.com/repos/Xevion/spotify-player-quickauth/releases/latest - curl -s https://api.github.com/repos/Xevion/spotify-player-quickauth/releases/latest | grep 'browser_download_url' - curl -s https://api.github.com/repos/Xevion/spotify-player-quickauth/releases/latest | grep 'browser_download_url' | grep 'aarch64-apple-darwin' - - name: Run Integration run: curl -sSL https://raw.githubusercontent.com/Xevion/spotify-player-quickauth/refs/heads/master/run.sh | sh \ No newline at end of file diff --git a/run.sh b/run.sh index 6558dae..4760d3a 100755 --- a/run.sh +++ b/run.sh @@ -17,7 +17,10 @@ fi # Fetch the latest release download URL REPO="Xevion/spotify-player-quickauth" API_URL="https://api.github.com/repos/$REPO/releases/latest" -DOWNLOAD_URL=$(curl -s $API_URL | grep "browser_download_url" | grep $target | cut -d '"' -f 4) +if [ -n "$GH_TOKEN" ]; then + API_URL="$API_URL --header 'Authorization: Bearer $GH_TOKEN'" +fi +DOWNLOAD_URL=$(curl -s $API_URL | grep "browser_download_url" | grep $target | cut -d '"' -f 4) if [ -z "$DOWNLOAD_URL" ]; then echo "No release could be found for the current platform"