From 6563874ee2635e688393f38983dcbecc9714693c Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 13:53:46 +0000 Subject: [PATCH] ci: fix Metro UnableToResolveError - generate userscript before build src/injection/userscript-source.ts is .gitignored (generated from userscript/movix.user.js). Metro bundler fails at bundle phase with UnableToResolveError when it tries to import ./userscript-source. Add `npm run build:userscript` step after npm ci to generate the file. Also: pipe xcodebuild through tee to save raw log + use ${PIPESTATUS[0]} for correct exit code propagation. Upload raw log as artifact on failure to expose the full error without xcpretty truncation. https://claude.ai/code/session_01X52sah6aUu3ou26uJWHgzr --- .github/workflows/build.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca16ff5..609dd2c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,9 @@ jobs: - name: 🗂️ • Install Node Dependencies run: npm ci --legacy-peer-deps + - name: 📝 • Generate userscript source + run: npm run build:userscript + - name: 💎 • Setup Ruby & CocoaPods 1.16.2 uses: ruby/setup-ruby@v1 with: @@ -82,7 +85,16 @@ jobs: CODE_SIGNING_ALLOWED=NO \ CODE_SIGN_IDENTITY="" \ ENABLE_USER_SCRIPT_SANDBOXING=NO \ - 2>&1 | xcpretty --color + 2>&1 | tee /tmp/xcodebuild.log | xcpretty --color + exit ${PIPESTATUS[0]} + + - name: 📋 • Upload build log on failure + if: failure() + uses: actions/upload-artifact@v4 + with: + name: xcodebuild-log + path: /tmp/xcodebuild.log + retention-days: 7 - name: 📦 • Package IPA run: |