From a8d13d302af623aa725e977cf772f16742fad67d Mon Sep 17 00:00:00 2001 From: MD4 Date: Thu, 11 Jun 2026 13:42:51 +0200 Subject: [PATCH] fix(*): authenticate iOS XCFramework download in MAUI workflows The MAUI CI job (and publish-maui) fetched the Screeb.zip asset via an unauthenticated curl to api.github.com. On shared macOS runner IPs this hit the 60 req/hour limit, returning a rate-limit JSON body with no 'assets' key -> 'KeyError: assets', failing the job on every commit. Use 'gh release download' authenticated with the built-in GITHUB_TOKEN (1000+/hour limit) and drop the brittle inline Python parsing. --- .github/workflows/ci.yml | 7 ++++--- .github/workflows/publish-maui.yml | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d0287a..e425263 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,11 +47,12 @@ jobs: - name: Install MAUI workloads run: dotnet workload install android ios - name: Download Screeb iOS XCFramework + env: + GH_TOKEN: ${{ github.token }} run: | - SCREEB_IOS_URL=$(curl -sL https://api.github.com/repos/ScreebApp/sdk-ios-public/releases/latest | python3 -c "import sys,json; print(next(a['browser_download_url'] for a in json.load(sys.stdin)['assets'] if a['name']=='Screeb.zip'))") - curl -sL "$SCREEB_IOS_URL" -o /tmp/Screeb.zip - unzip -q /tmp/Screeb.zip -d /tmp/screeb_ios mkdir -p packages/sdk-maui/native/ios + gh release download --repo ScreebApp/sdk-ios-public --pattern 'Screeb.zip' --output /tmp/Screeb.zip --clobber + unzip -q /tmp/Screeb.zip -d /tmp/screeb_ios cp -r /tmp/screeb_ios/Screeb.xcframework packages/sdk-maui/native/ios/ - name: Restore run: dotnet restore packages/sdk-maui/ScreebMaui.csproj diff --git a/.github/workflows/publish-maui.yml b/.github/workflows/publish-maui.yml index 6edd3d1..43791d9 100644 --- a/.github/workflows/publish-maui.yml +++ b/.github/workflows/publish-maui.yml @@ -19,11 +19,12 @@ jobs: run: dotnet workload install android ios - name: Download Screeb iOS XCFramework + env: + GH_TOKEN: ${{ github.token }} run: | - SCREEB_IOS_URL=$(curl -sL https://api.github.com/repos/ScreebApp/sdk-ios-public/releases/latest | python3 -c "import sys,json; print(next(a['browser_download_url'] for a in json.load(sys.stdin)['assets'] if a['name']=='Screeb.zip'))") - curl -sL "$SCREEB_IOS_URL" -o /tmp/Screeb.zip - unzip -q /tmp/Screeb.zip -d /tmp/screeb_ios mkdir -p packages/sdk-maui/native/ios + gh release download --repo ScreebApp/sdk-ios-public --pattern 'Screeb.zip' --output /tmp/Screeb.zip --clobber + unzip -q /tmp/Screeb.zip -d /tmp/screeb_ios cp -r /tmp/screeb_ios/Screeb.xcframework packages/sdk-maui/native/ios/ - name: Restore