From efbd96f20ed7508f4cffbadbec5741fbb8d86212 Mon Sep 17 00:00:00 2001 From: Shawn Jackson Date: Sat, 14 Jun 2025 05:44:22 -0700 Subject: [PATCH] CU-868cu9311 CI Updates --- .github/workflows/react-native-cicd.yml | 39 +++++-------------------- fastlane/Fastfile | 14 ++++++++- 2 files changed, 20 insertions(+), 33 deletions(-) diff --git a/.github/workflows/react-native-cicd.yml b/.github/workflows/react-native-cicd.yml index 4e832edd..5fe1fef5 100644 --- a/.github/workflows/react-native-cicd.yml +++ b/.github/workflows/react-native-cicd.yml @@ -98,10 +98,7 @@ jobs: if: (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')) || github.event_name == 'workflow_dispatch' strategy: matrix: - platform: [android] - include: - - platform: ios - runs-on: macos-latest + platform: [android, ios] runs-on: ${{ matrix.platform == 'ios' && 'macos-latest' || 'ubuntu-latest' }} environment: RNBuild steps: @@ -124,28 +121,6 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - - name: 🏗 Install Fastlane - run: | - yarn global add fastlane - - - name: 🏗 Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '2.6' - bundler-cache: true - - - name: 🏗 Install bundler & Fastlane - run: | - gem install bundler:2.2.27 - bundle config path vendor/bundle - bundle install --jobs 4 --retry 3 - - - name: 📋 Run Fastlane Match - run: | - bundle exec fastlane ios certificates - env: - KEYCHAIN_PATH: ~/Library/Keychains/signing_temp.keychain-db - - name: 📦 Install dependencies run: | yarn install --frozen-lockfile @@ -177,7 +152,7 @@ jobs: eas --version - name: 📱 Build Development APK - if: github.event.inputs.buildType == 'all' || github.event.inputs.buildType == 'dev' || github.event_name == 'push' && (matrix.platform == 'android' || github.event.inputs.platform == 'all' || github.event.inputs.platform == 'android') + if: (matrix.platform == 'android' && (github.event.inputs.buildType == 'all' || github.event_name == 'push' || github.event.inputs.buildType == 'dev')) run: | # Build with increased memory limit export NODE_OPTIONS="--openssl-legacy-provider --max_old_space_size=4096" @@ -186,7 +161,7 @@ jobs: NODE_ENV: development - name: 📱 Build Production APK - if: github.event.inputs.buildType == 'all' || github.event.inputs.buildType == 'prod-apk' || github.event_name == 'push' && (matrix.platform == 'android' || github.event.inputs.platform == 'all' || github.event.inputs.platform == 'android') + if: (matrix.platform == 'android' && (github.event.inputs.buildType == 'all' || github.event_name == 'push' || github.event.inputs.buildType == 'prod-apk')) run: | export NODE_OPTIONS="--openssl-legacy-provider --max_old_space_size=4096" eas build --platform android --profile production-apk --local --non-interactive --output=./app-prod.apk @@ -194,7 +169,7 @@ jobs: NODE_ENV: production - name: 📱 Build Production AAB - if: github.event.inputs.buildType == 'all' || github.event.inputs.buildType == 'prod-aab' || github.event_name == 'push' && (matrix.platform == 'android' || github.event.inputs.platform == 'all' || github.event.inputs.platform == 'android') + if: (matrix.platform == 'android' && (github.event.inputs.buildType == 'all' || github.event_name == 'push' || github.event.inputs.buildType == 'prod-aab')) run: | export NODE_OPTIONS="--openssl-legacy-provider --max_old_space_size=4096" eas build --platform android --profile production --local --non-interactive --output=./app-prod.aab @@ -202,7 +177,7 @@ jobs: NODE_ENV: production - name: 📱 Build iOS Development - if: (github.event.inputs.buildType == 'all' || github.event_name == 'push' || github.event.inputs.buildType == 'ios-dev') && (matrix.platform == 'ios' || github.event.inputs.platform == 'all' || github.event.inputs.platform == 'ios') + if: (matrix.platform == 'ios' && (github.event.inputs.buildType == 'all' || github.event_name == 'push' || github.event.inputs.buildType == 'ios-dev')) run: | export NODE_OPTIONS="--openssl-legacy-provider --max_old_space_size=4096" eas build --platform ios --profile development --local --non-interactive --output=./app-ios-dev.app @@ -210,7 +185,7 @@ jobs: NODE_ENV: development - name: 📱 Build iOS Ad-Hoc - if: (github.event.inputs.buildType == 'all' || github.event_name == 'push' || github.event.inputs.buildType == 'ios-adhoc') && (matrix.platform == 'ios' || github.event.inputs.platform == 'all' || github.event.inputs.platform == 'ios') + if: (matrix.platform == 'ios' && (github.event.inputs.buildType == 'all' || github.event_name == 'push' || github.event.inputs.buildType == 'ios-adhoc')) run: | export NODE_OPTIONS="--openssl-legacy-provider --max_old_space_size=4096" eas build --platform ios --profile internal --local --non-interactive --output=./app-ios-adhoc.app @@ -218,7 +193,7 @@ jobs: NODE_ENV: production - name: 📱 Build iOS Production - if: (github.event.inputs.buildType == 'all' || github.event_name == 'push' || github.event.inputs.buildType == 'ios-prod') && (matrix.platform == 'ios' || github.event.inputs.platform == 'all' || github.event.inputs.platform == 'ios') + if: (matrix.platform == 'ios' && (github.event.inputs.buildType == 'all' || github.event_name == 'push' || github.event.inputs.buildType == 'ios-prod')) run: | export NODE_OPTIONS="--openssl-legacy-provider --max_old_space_size=4096" eas build --platform ios --profile production --local --non-interactive --output=./app-ios-prod.ipa diff --git a/fastlane/Fastfile b/fastlane/Fastfile index c51b4774..ed8a2e38 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -8,7 +8,7 @@ default_platform :ios platform :ios do lane :certificates do setup_ci - + app_store_connect_api_key( key_id: ENV["APP_STORE_CONNECT_KEY_ID"], issuer_id: ENV["APP_STORE_CONNECT_ISSUER_ID"], @@ -22,4 +22,16 @@ platform :ios do match(git_url: ENV["MATCH_GIT_URL"], git_basic_authorization: ENV["MATCH_GIT_BASIC_AUTHORIZATION"], type: "adhoc", app_identifier: ENV["MATCH_UNIT_BUNDLEID"], readonly: true) match(git_url: ENV["MATCH_GIT_URL"], git_basic_authorization: ENV["MATCH_GIT_BASIC_AUTHORIZATION"], type: "appstore", app_identifier: ENV["MATCH_UNIT_BUNDLEID"], readonly: true) end + + lane :prep_development do + sh("cp", ENV["sigh_com.resgrid.unit_development_profile-path"], "./profile.mobileprovision", "-f") + end + + lane :prep_adhoc do + sh("cp", ENV["sigh_com.resgrid.unit_adhoc_profile-path"], "./profile.mobileprovision", "-f") + end + + lane :prep_appstore do + sh("cp", ENV["sigh_com.resgrid.unit_appstore_profile-path"], "./profile.mobileprovision", "-f") + end end