diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 575ee2a..068c2d6 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -112,6 +112,27 @@ jobs: mkdir -p build/ios/ipa cp $RUNNER_TEMP/export/*.ipa build/ios/ipa/ + - name: Upload dSYMs to Crashlytics + env: + GOOGLE_SERVICE_INFO_PLIST: ${{ secrets.GOOGLE_SERVICE_INFO_PLIST }} + run: | + # Find the Crashlytics upload-symbols binary from Pods + UPLOAD_SYMBOLS=$(find ios/Pods -name "upload-symbols" -type f | head -1) + + if [ -z "$UPLOAD_SYMBOLS" ]; then + echo "upload-symbols binary not found, skipping dSYM upload" + exit 0 + fi + + # Write GoogleService-Info.plist from secret + echo -n "$GOOGLE_SERVICE_INFO_PLIST" | base64 --decode > $RUNNER_TEMP/GoogleService-Info.plist + + # Upload dSYMs from the xcarchive + "$UPLOAD_SYMBOLS" \ + -gsp $RUNNER_TEMP/GoogleService-Info.plist \ + -p ios \ + $RUNNER_TEMP/Runner.xcarchive/dSYMs + # ── Upload to TestFlight ──────────────────────────────────────────────── - name: Upload to TestFlight via Transporter