forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
15a61d7
commit 562be33
Showing
3 changed files
with
52 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,112 +199,90 @@ jobs: | |
name: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && 'desktop-build-artifact' || 'desktop-staging-build-artifact' }} | ||
path: ./desktop-build/NewExpensify.dmg | ||
|
||
iOS: | ||
name: Build and deploy iOS | ||
buildIOS: | ||
name: Build iOS app | ||
uses: ./.github/workflows/buildIOS.yml | ||
if: ${{ github.ref == 'refs/heads/staging' }} | ||
needs: prep | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_15.2.0.app/Contents/Developer | ||
runs-on: macos-13-xlarge | ||
secrets: inherit | ||
with: | ||
type: release | ||
ref: staging | ||
|
||
uploadIOS: | ||
name: Upload iOS App to TestFlight | ||
needs: buildIOS | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Configure MapBox SDK | ||
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }} | ||
|
||
- name: Setup Node | ||
id: setup-node | ||
uses: ./.github/actions/composite/setupNode | ||
|
||
- name: Setup Ruby | ||
uses: ruby/[email protected] | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Cache Pod dependencies | ||
uses: actions/cache@v4 | ||
id: pods-cache | ||
with: | ||
path: ios/Pods | ||
key: ${{ runner.os }}-pods-cache-${{ hashFiles('ios/Podfile.lock', 'firebase.json') }} | ||
|
||
- name: Compare Podfile.lock and Manifest.lock | ||
id: compare-podfile-and-manifest | ||
run: echo "IS_PODFILE_SAME_AS_MANIFEST=${{ hashFiles('ios/Podfile.lock') == hashFiles('ios/Pods/Manifest.lock') }}" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Install cocoapods | ||
uses: nick-fields/retry@3f757583fb1b1f940bc8ef4bf4734c8dc02a5847 | ||
if: steps.pods-cache.outputs.cache-hit != 'true' || steps.compare-podfile-and-manifest.outputs.IS_PODFILE_SAME_AS_MANIFEST != 'true' || steps.setup-node.outputs.cache-hit != 'true' | ||
with: | ||
timeout_minutes: 10 | ||
max_attempts: 5 | ||
command: scripts/pod-install.sh | ||
|
||
- name: Decrypt AppStore profile | ||
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output NewApp_AppStore.mobileprovision NewApp_AppStore.mobileprovision.gpg | ||
env: | ||
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} | ||
|
||
- name: Decrypt AppStore Notification Service profile | ||
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output NewApp_AppStore_Notification_Service.mobileprovision NewApp_AppStore_Notification_Service.mobileprovision.gpg | ||
env: | ||
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} | ||
|
||
- name: Decrypt certificate | ||
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output Certificates.p12 Certificates.p12.gpg | ||
env: | ||
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} | ||
|
||
- name: Decrypt App Store Connect API key | ||
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output ios-fastlane-json-key.json ios-fastlane-json-key.json.gpg | ||
env: | ||
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} | ||
|
||
- name: Get iOS native version | ||
id: getIOSVersion | ||
run: echo "IOS_VERSION=$(echo '${{ needs.prep.outputs.APP_VERSION }}' | tr '-' '.')" >> "$GITHUB_OUTPUT" | ||
- name: Download iOS build artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: /tmp/artifacts | ||
pattern: ios-artifact-* | ||
merge-multiple: true | ||
|
||
- name: Build iOS release app | ||
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} | ||
run: bundle exec fastlane ios build | ||
- name: Log downloaded artifact paths | ||
run: ls -R /tmp/artifacts | ||
|
||
- name: Upload release build to TestFlight | ||
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} | ||
- name: Upload iOS app to TestFlight | ||
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 }} | ||
ipaPath: /tmp/artifacts/${{ needs.buildIOS.outputs.IPA_FILE_NAME }} | ||
dsymPath: /tmp/artifacts/${{ needs.buildIOS.outputs.DSYM_FILE_NAME }} | ||
|
||
- 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" | ||
run: curl -u "$BROWSERSTACK" -X POST "https://api-cloud.browserstack.com/app-live/upload" -F "file=@/tmp/artifacts/${{ needs.buildIOS.outputs.IPA_PATH }}" | ||
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 | ||
submitIOS: | ||
name: Submit iOS app for Apple review | ||
needs: prep | ||
if: ${{ github.ref == 'refs/heads/production' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Upload iOS build artifact | ||
if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} | ||
uses: actions/upload-artifact@v4 | ||
- name: Setup Ruby | ||
uses: ruby/[email protected] | ||
with: | ||
name: ios-build-artifact | ||
path: /Users/runner/work/App/App/New\ Expensify.ipa | ||
bundler-cache: true | ||
|
||
- name: Decrypt App Store Connect API key | ||
run: cd ios && gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output ios-fastlane-json-key.json ios-fastlane-json-key.json.gpg | ||
env: | ||
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} | ||
|
||
- name: Get iOS native version | ||
id: getIOSVersion | ||
run: echo "IOS_VERSION=$(echo '${{ needs.prep.outputs.APP_VERSION }}' | tr '-' '.')" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Submit build for App Store review | ||
run: bundle exec fastlane ios submit_for_review | ||
env: | ||
VERSION: ${{ steps.getIOSVersion.outputs.IOS_VERSION }} | ||
|
||
- name: Warn deployers if iOS production deploy failed | ||
if: ${{ failure() && fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} | ||
if: ${{ failure() }} | ||
uses: 8398a7/action-slack@v3 | ||
with: | ||
status: custom | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters