Skip to content

Commit

Permalink
Try to upload iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGable committed Oct 24, 2024
1 parent bf934cc commit f4f7101
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 37 deletions.
73 changes: 38 additions & 35 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ jobs:
ANDROID_UPLOAD_KEYSTORE_ALIAS: ${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_ALIAS }}
ANDROID_UPLOAD_KEY_PASSWORD: ${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEY_PASSWORD }}

- name: Debug paths
run: |
ls -laR .
- name: Upload Android app to Google Play
run: bundle exec fastlane android upload_google_play_internal_hybrid
env:
Expand Down Expand Up @@ -576,41 +580,40 @@ jobs:
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: bundle exec fastlane ios build_hybrid

# - name: Upload release build to TestFlight
# if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
# run: bundle exec fastlane ios upload_testflight
# env:
# APPLE_CONTACT_EMAIL: ${{ secrets.APPLE_CONTACT_EMAIL }}
# APPLE_CONTACT_PHONE: ${{ secrets.APPLE_CONTACT_PHONE }}
# APPLE_DEMO_EMAIL: ${{ secrets.APPLE_DEMO_EMAIL }}
# APPLE_DEMO_PASSWORD: ${{ secrets.APPLE_DEMO_PASSWORD }}
#
# - name: Submit build for App Store review
# if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
# run: bundle exec fastlane ios submit_for_review
# env:
# VERSION: ${{ steps.getIOSVersion.outputs.IOS_VERSION }}
#
# - name: Upload iOS build to Browser Stack
# if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
# run: curl -u "$BROWSERSTACK" -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@/Users/runner/work/App/App/New Expensify.ipa"
# env:
# BROWSERSTACK: ${{ secrets.BROWSERSTACK }}
#
# - name: Upload iOS sourcemaps artifact
# if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
# uses: actions/upload-artifact@v4
# with:
# name: ios-sourcemaps-artifact
# path: ./main.jsbundle.map
#
# - name: Upload iOS build artifact
# if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
# uses: actions/upload-artifact@v4
# with:
# name: ios-build-artifact
# path: /Users/runner/work/App/App/New\ Expensify.ipa
#
- name: Debug paths
run: |
ls -laR .
- name: Upload release build to TestFlight
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: bundle exec fastlane ios upload_testflight_hybrid
env:
APPLE_CONTACT_EMAIL: ${{ secrets.APPLE_CONTACT_EMAIL }}
APPLE_CONTACT_PHONE: ${{ secrets.APPLE_CONTACT_PHONE }}
APPLE_DEMO_EMAIL: ${{ secrets.APPLE_DEMO_EMAIL }}
APPLE_DEMO_PASSWORD: ${{ secrets.APPLE_DEMO_PASSWORD }}

- name: Upload iOS build to Browser Stack
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
run: curl -u "$BROWSERSTACK" -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@builds/${{ env.VERSION }}/${{ env.VERSION }}.ipa"
env:
BROWSERSTACK: ${{ secrets.BROWSERSTACK }}
VERSION: "$(cat ../app/config/config.json | jq -r '.meta.version')"

- name: Upload iOS sourcemaps artifact
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
uses: actions/upload-artifact@v4
with:
name: ios-sourcemaps-artifact
path: ./main.jsbundle.map

- name: Upload iOS build artifact
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
uses: actions/upload-artifact@v4
with:
name: ios-build-artifact
path: builds/"$(cat ../app/config/config.json | jq -r '.meta.version')"/"$(cat ../app/config/config.json | jq -r '.meta.version')".ipa

# - name: Warn deployers if iOS production deploy failed
# if: ${{ failure() && fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
# uses: 8398a7/action-slack@v3
Expand Down
4 changes: 2 additions & 2 deletions fastlane/Appfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ apple_id("[email protected]") # Your Apple email address
itc_team_id("152696") # App Store Connect Team ID
team_id("368M544MTT") # Developer Portal Team ID

for_lane :build_hybrid, :build_unsigned_hybrid do
for_lane :build_hybrid, :build_unsigned_hybrid, :upload_testflight_hybrid do
app_identifier("com.expensify.expensifylite")
end
end
24 changes: 24 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,30 @@ platform :ios do
}
)

desc "Upload HybridApp to TestFlight"
lane :upload_testflight do
upload_to_testflight(
api_key_path: "./ios/ios-fastlane-json-key.json",
distribute_external: true,
notify_external_testers: true,
changelog: "Thank you for beta testing New Expensify, this version includes bug fixes and improvements.",
groups: ["Beta"],
demo_account_required: true,
beta_app_review_info: {
contact_email: ENV["APPLE_CONTACT_EMAIL"],
contact_first_name: "Andrew",
contact_last_name: "Gable",
contact_phone: ENV["APPLE_CONTACT_PHONE"],
demo_account_name: ENV["APPLE_DEMO_EMAIL"],
demo_account_password: ENV["APPLE_DEMO_PASSWORD"],
notes: "1. In the Expensify app, enter the email '[email protected]'. This will trigger a sign-in link to be sent to '[email protected]'
2. Navigate to https://account.proton.me/login, log into Proton Mail using '[email protected]' as email and the password associated with '[email protected]', provided above
3. Once logged into Proton Mail, navigate to your inbox and locate the email triggered in step 1. The email subject should be 'Your magic sign-in link for Expensify'
4. Open the email and copy the 6-digit sign-in code provided within
5. Return to the Expensify app and enter the copied 6-digit code in the designated login field"
}
)

puts "dsym path: #{ENV[KEY_DSYM_PATH]}"
upload_symbols_to_crashlytics(
app_id: "1:921154746561:ios:216bd10ccc947659027c40",
Expand Down

0 comments on commit f4f7101

Please sign in to comment.