From 46471843475f663aa9aac093b4917a84fff64fc5 Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 3 Oct 2024 14:22:38 -0500 Subject: [PATCH] Multi-step grep, separate Windows integration into separate job --- .github/workflows/integration.yaml | 18 ++++++++++-------- run.sh | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index c97e77e..30b5b18 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -8,17 +8,19 @@ on: - completed jobs: - integration: + integration-windows: + runs-on: windows-latest + + steps: + - name: Run Integration + run: iex (irm "https://raw.githubusercontent.com/Xevion/spotify-player-quickauth/refs/heads/master/run.ps1") + + integration-unix: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - name: Run Integration - if: ${{ !contains(matrix.os, 'windows') }} - run: curl -sSL https://raw.githubusercontent.com/Xevion/spotify-player-quickauth/refs/heads/master/run.sh | sh - - - name: Run Integration (Windows) - if: ${{ contains(matrix.os, 'windows') }} - run: iex (irm "https://raw.githubusercontent.com/Xevion/spotify-player-quickauth/refs/heads/master/run.ps1") \ No newline at end of file + 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 31ad111..6558dae 100755 --- a/run.sh +++ b/run.sh @@ -17,7 +17,7 @@ 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.*$target" | cut -d '"' -f 4) +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"