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
This commit is contained in:
Claude 2026-06-11 13:53:46 +00:00
parent 902d8b4f75
commit 6563874ee2
No known key found for this signature in database

View file

@ -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: |