Multi-step grep, separate Windows integration into separate job

This commit is contained in:
2024-10-03 14:22:38 -05:00
parent 4a07bd9b50
commit 4647184347
2 changed files with 11 additions and 9 deletions

View File

@@ -8,17 +8,19 @@ on:
- completed - completed
jobs: 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: strategy:
matrix: matrix:
os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Run Integration - 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
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")

2
run.sh
View File

@@ -17,7 +17,7 @@ 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.*$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 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"