Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/testflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ jobs:
cache: true

- name: Install SwiftLint
env:
HOMEBREW_REQUIRE_TAP_TRUST: "1"
shell: bash
run: |
set -euo pipefail
Expand All @@ -114,6 +116,32 @@ jobs:
- name: Build for TestFlight
run: bundle exec fastlane testflight_build_only

- name: Upload dSYM to Firebase Crashlytics
shell: bash
run: |
set -euo pipefail

google_service_info_path="Application/DevLogApp/Sources/Resource/GoogleService-Info.plist"
dsym_zip_path="$(find fastlane/testflight_build -maxdepth 1 -name '*.dSYM.zip' -print -quit)"
upload_symbols_path="$(find "$HOME/Library/Developer/Xcode/DerivedData" "$HOME/Library/Developer/Xcode/SourcePackages" "$GITHUB_WORKSPACE" -path '*/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/upload-symbols' -type f -print -quit 2>/dev/null || true)"

if [ ! -f "$google_service_info_path" ]; then
echo "Missing GoogleService-Info.plist at $google_service_info_path" >&2
exit 1
fi

if [ -z "$dsym_zip_path" ]; then
echo "Missing dSYM zip in fastlane/testflight_build" >&2
exit 1
fi

if [ -z "$upload_symbols_path" ]; then
echo "Missing Firebase Crashlytics upload-symbols script" >&2
exit 1
fi

"$upload_symbols_path" -gsp "$google_service_info_path" -p ios "$dsym_zip_path"

- name: Upload TestFlight build log
if: always()
uses: actions/upload-artifact@v6
Expand All @@ -122,6 +150,14 @@ jobs:
path: ~/Library/Logs/gym/*.log
if-no-files-found: ignore

- name: Upload TestFlight dSYM
if: always()
uses: actions/upload-artifact@v6
with:
name: testflight-dsym
path: fastlane/testflight_build/*.dSYM.zip
if-no-files-found: warn

- name: Skip TestFlight Upload
if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'qa-local')) || (github.event_name == 'workflow_dispatch' && inputs.upload_to_app_store_connect != 'true')
run: echo "Skipping TestFlight upload"
Expand Down
6 changes: 6 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,15 @@ platform :ios do
export_method: "app-store",
output_directory: TESTFLIGHT_BUILD_OUTPUT_DIRECTORY,
output_name: "#{APP_PRODUCT_NAME}.ipa",
include_symbols: true,
xcargs: "-skipPackagePluginValidation -skipMacroValidation"
)

dsym_output_path = lane_context[SharedValues::DSYM_OUTPUT_PATH]
archive_path = lane_context[SharedValues::XCODEBUILD_ARCHIVE]
UI.message("dSYM output path: #{dsym_output_path}") unless dsym_output_path.to_s.empty?
UI.message("Xcode archive path: #{archive_path}") unless archive_path.to_s.empty?

next api_key
end

Expand Down
Loading