remove debug step, try GH_TOKEN authorization, run.sh add Bearer token auth

This commit is contained in:
2024-10-03 14:39:59 -05:00
parent a1689cd008
commit 4c4cb0a0c6
2 changed files with 9 additions and 9 deletions

View File

@@ -6,6 +6,8 @@ on:
workflows: ["Build"] workflows: ["Build"]
types: types:
- completed - completed
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs: jobs:
integration-windows: integration-windows:
@@ -18,16 +20,11 @@ jobs:
integration-unix: integration-unix:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, macos-latest] os: [ubuntu-latest, macos-latest, macos-13]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
name: 'Integration (${{ matrix.os }})'
steps: 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 - name: Run Integration
run: curl -sSL https://raw.githubusercontent.com/Xevion/spotify-player-quickauth/refs/heads/master/run.sh | sh run: curl -sSL https://raw.githubusercontent.com/Xevion/spotify-player-quickauth/refs/heads/master/run.sh | sh

5
run.sh
View File

@@ -17,7 +17,10 @@ fi
# Fetch the latest release download URL # Fetch the latest release download URL
REPO="Xevion/spotify-player-quickauth" 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"
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 if [ -z "$DOWNLOAD_URL" ]; then
echo "No release could be found for the current platform" echo "No release could be found for the current platform"