From fc09df2889d8f8aa7189fb2544e2186d8a638bf7 Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Thu, 18 Dec 2025 13:46:14 +0530 Subject: [PATCH 01/19] chore: add android build and deploy workflows and improve ios workflow --- examples/SampleApp/.gitignore | 4 + examples/SampleApp/Gemfile.lock | 2 + examples/SampleApp/android/app/build.gradle | 6 +- .../android/app/google-services.json | 4 +- .../java/com/sampleapp/DetoxTest.java | 4 +- .../main/java/com/sampleapp/MainActivity.kt | 2 +- .../java/com/sampleapp/MainApplication.kt | 2 +- examples/SampleApp/fastlane/Fastfile | 196 ++++++++++++------ examples/SampleApp/fastlane/Pluginfile | 1 + examples/SampleApp/package.json | 6 +- 10 files changed, 154 insertions(+), 73 deletions(-) diff --git a/examples/SampleApp/.gitignore b/examples/SampleApp/.gitignore index 1f3e68a22e..61f08e514a 100644 --- a/examples/SampleApp/.gitignore +++ b/examples/SampleApp/.gitignore @@ -73,3 +73,7 @@ yarn-error.log !.yarn/releases !.yarn/sdks !.yarn/versions + +# Credentials +credentials/ +app-build/ \ No newline at end of file diff --git a/examples/SampleApp/Gemfile.lock b/examples/SampleApp/Gemfile.lock index 83479ab205..1c1b142e57 100644 --- a/examples/SampleApp/Gemfile.lock +++ b/examples/SampleApp/Gemfile.lock @@ -164,6 +164,7 @@ GEM fastlane-plugin-firebase_app_distribution (0.9.1) google-apis-firebaseappdistribution_v1 (~> 0.3.0) google-apis-firebaseappdistribution_v1alpha (~> 0.2.0) + fastlane-plugin-increment_version_code (0.4.3) fastlane-plugin-load_json (0.0.1) fastlane-plugin-stream_actions (0.3.73) xctest_list (= 1.2.1) @@ -326,6 +327,7 @@ DEPENDENCIES concurrent-ruby (< 1.3.4) fastlane fastlane-plugin-firebase_app_distribution + fastlane-plugin-increment_version_code fastlane-plugin-load_json fastlane-plugin-stream_actions (= 0.3.73) logger diff --git a/examples/SampleApp/android/app/build.gradle b/examples/SampleApp/android/app/build.gradle index e1c59595a5..39b1680d7a 100644 --- a/examples/SampleApp/android/app/build.gradle +++ b/examples/SampleApp/android/app/build.gradle @@ -79,15 +79,15 @@ android { buildToolsVersion rootProject.ext.buildToolsVersion compileSdk rootProject.ext.compileSdkVersion - namespace "com.sampleapp" + namespace "io.getstream.reactnative.sampleapp" defaultConfig { - applicationId "com.sampleapp" + applicationId "io.getstream.reactnative.sampleapp" minSdkVersion rootProject.ext.minSdkVersion multiDexEnabled true targetSdkVersion rootProject.ext.targetSdkVersion vectorDrawables.useSupportLibrary = true - versionCode 22 + versionCode 1 versionName "0.0.22" } diff --git a/examples/SampleApp/android/app/google-services.json b/examples/SampleApp/android/app/google-services.json index 1d5c701c81..ec09246afb 100644 --- a/examples/SampleApp/android/app/google-services.json +++ b/examples/SampleApp/android/app/google-services.json @@ -62,7 +62,7 @@ "client_info": { "mobilesdk_app_id": "1:674907137625:android:5effa1cd0fef9003d7f348", "android_client_info": { - "package_name": "com.sampleapp" + "package_name": "io.getstream.reactnative.sampleapp" } }, "oauth_client": [ @@ -98,7 +98,7 @@ "client_info": { "mobilesdk_app_id": "1:674907137625:android:07c76802bbfd5654d7f348", "android_client_info": { - "package_name": "com.sampleapp.rnpushtest" + "package_name": "io.getstream.reactnative.sampleapp.rnpushtest" } }, "oauth_client": [ diff --git a/examples/SampleApp/android/app/src/androidTest/java/com/sampleapp/DetoxTest.java b/examples/SampleApp/android/app/src/androidTest/java/com/sampleapp/DetoxTest.java index df226139a6..9557ec76a9 100644 --- a/examples/SampleApp/android/app/src/androidTest/java/com/sampleapp/DetoxTest.java +++ b/examples/SampleApp/android/app/src/androidTest/java/com/sampleapp/DetoxTest.java @@ -1,4 +1,4 @@ -package com.sampleapp; +package io.getstream.reactnative.sampleapp; import com.wix.detox.Detox; import com.wix.detox.config.DetoxConfig; @@ -24,7 +24,7 @@ public void runDetoxTests() { DetoxConfig detoxConfig = new DetoxConfig(); detoxConfig.idlePolicyConfig.masterTimeoutSec = 90; detoxConfig.idlePolicyConfig.idleResourceTimeoutSec = 60; - detoxConfig.rnContextLoadTimeoutSec = (com.sampleapp.BuildConfig.DEBUG ? 180 : 60); + detoxConfig.rnContextLoadTimeoutSec = (io.getstream.reactnative.sampleapp.BuildConfig.DEBUG ? 180 : 60); Detox.runTests(mActivityRule, detoxConfig); } diff --git a/examples/SampleApp/android/app/src/main/java/com/sampleapp/MainActivity.kt b/examples/SampleApp/android/app/src/main/java/com/sampleapp/MainActivity.kt index f3ca98b78b..e1de600051 100644 --- a/examples/SampleApp/android/app/src/main/java/com/sampleapp/MainActivity.kt +++ b/examples/SampleApp/android/app/src/main/java/com/sampleapp/MainActivity.kt @@ -1,4 +1,4 @@ -package com.sampleapp +package io.getstream.reactnative.sampleapp import com.facebook.react.ReactActivity import com.facebook.react.ReactActivityDelegate diff --git a/examples/SampleApp/android/app/src/main/java/com/sampleapp/MainApplication.kt b/examples/SampleApp/android/app/src/main/java/com/sampleapp/MainApplication.kt index 69b92b8443..84c3f9a65e 100644 --- a/examples/SampleApp/android/app/src/main/java/com/sampleapp/MainApplication.kt +++ b/examples/SampleApp/android/app/src/main/java/com/sampleapp/MainApplication.kt @@ -1,4 +1,4 @@ -package com.sampleapp +package io.getstream.reactnative.sampleapp import android.app.Application import com.facebook.react.PackageList diff --git a/examples/SampleApp/fastlane/Fastfile b/examples/SampleApp/fastlane/Fastfile index bf10e28713..c30b1e6c15 100644 --- a/examples/SampleApp/fastlane/Fastfile +++ b/examples/SampleApp/fastlane/Fastfile @@ -1,13 +1,25 @@ -default_platform(:ios) skip_docs +# Common Configuration github_repo = ENV['GITHUB_REPOSITORY'] || 'GetStream/stream-chat-react-native' -bundle_id = 'io.getstream.reactnative.SampleApp' -xcode_project = 'ios/SampleApp.xcodeproj' -xcode_workspace = 'ios/SampleApp.xcworkspace' root_path = File.absolute_path('../../../') sdk_size_ext = 'KB' @force_check = false +build_output_directory = "./app-build" + +# iOS Platform Configuration +bundle_id = 'io.getstream.reactnative.SampleApp' +xcode_project = 'ios/SampleApp.xcodeproj' +xcode_workspace = 'ios/SampleApp.xcworkspace' +output_ipa_name = "reactnativesampleapp.ipa" + +# Android Platform Configuration +package_name = 'io.getstream.reactnative.sampleapp' +firebase_app_id = "1:860064972837:android:45442c1123323ac9f17fcc" +firebase_credentials_file = "./credentials/firebase-credentials.json" +output_apk_name = "reactnativesampleapp.apk" +apk_path = "#{build_output_directory}/#{output_apk_name}" + before_all do if is_ci @@ -20,82 +32,140 @@ end ###### iOS lanes ###### ####################### -lane :deploy_to_testflight_qa do |options| - match_me - - settings_to_override = { - BUNDLE_IDENTIFIER: bundle_id, - PROVISIONING_PROFILE_SPECIFIER: "match AppStore #{bundle_id}" - } - - increment_version_number( - version_number: load_json(json_path: './package.json')['version'], - xcodeproj: xcode_project - ) - - current_build_number = app_store_build_number( - api_key: appstore_api_key, - live: false, - app_identifier: bundle_id +platform :ios do + lane :deploy_to_testflight_qa do |options| + match_me + + deploy = options.fetch(:deploy, false) + + UI.message("Deploying to Testflight: #{deploy}") + + settings_to_override = { + BUNDLE_IDENTIFIER: bundle_id, + PROVISIONING_PROFILE_SPECIFIER: "match AppStore #{bundle_id}" + } + + gym( + workspace: xcode_workspace, + scheme: 'SampleApp', + export_method: 'app-store', + export_options: './fastlane/testflight_gym_export_options.plist', + silent: true, + clean: true, + xcargs: settings_to_override, + include_symbols: true, + output_directory: build_output_directory ) - increment_build_number( - build_number: current_build_number + 1, - xcodeproj: xcode_project - ) + if deploy + increment_version_number( + version_number: load_json(json_path: './package.json')['version'], + xcodeproj: xcode_project + ) - gym( - workspace: xcode_workspace, - scheme: 'SampleApp', - export_method: 'app-store', - export_options: './fastlane/testflight_gym_export_options.plist', - silent: true, - clean: true, - xcargs: settings_to_override, - include_symbols: true, - output_directory: './dist' - ) + current_build_number = app_store_build_number( + api_key: appstore_api_key, + live: false, + app_identifier: bundle_id + ) + + increment_build_number( + build_number: current_build_number + 1, + xcodeproj: xcode_project + ) - if options[:deploy] - begin upload_to_testflight( groups: ['Testers'], changelog: 'Lots of amazing new features to test out!', - reject_build_waiting_for_review: false + reject_build_waiting_for_review: false, + ipa: "#{build_output_directory}/#{output_ipa_name}" ) - rescue StandardError => e - if e.message.include?('Another build is in review') - UI.important('Another build is already in beta review. Skipping beta review submission') - else - UI.user_error!(e) - end + else + UI.message("Skipping Testflight upload! (deploy: #{deploy})") end end -end - -private_lane :appstore_api_key do - @appstore_api_key ||= app_store_connect_api_key( - key_id: 'MT3PRT8TB7', - issuer_id: '69a6de96-0738-47e3-e053-5b8c7c11a4d1', - key_content: ENV.fetch('APPSTORE_API_KEY', nil), - in_house: false - ) -end -desc "If `readonly: true` (by default), installs all Certs and Profiles necessary for development and ad-hoc.\nIf `readonly: false`, recreates all Profiles necessary for development and ad-hoc, updates them locally and remotely." -lane :match_me do |options| - custom_match( - api_key: appstore_api_key, - app_identifier: [bundle_id], - readonly: options[:readonly], - register_device: options[:register_device] - ) + private_lane :appstore_api_key do + @appstore_api_key ||= app_store_connect_api_key( + key_id: 'MT3PRT8TB7', + issuer_id: '69a6de96-0738-47e3-e053-5b8c7c11a4d1', + key_content: ENV.fetch('APPSTORE_API_KEY', nil), + in_house: false + ) + end + + desc "If `readonly: true` (by default), installs all Certs and Profiles necessary for development and ad-hoc.\nIf `readonly: false`, recreates all Profiles necessary for development and ad-hoc, updates them locally and remotely." + lane :match_me do |options| + custom_match( + api_key: appstore_api_key, + app_identifier: [bundle_id], + readonly: options[:readonly], + register_device: options[:register_device] + ) + end end ########################### ###### Android lanes ###### ########################### +platform :android do + lane :firebase_build_and_upload do |options| + deploy = options.fetch(:deploy, false) + + UI.message("Deploying to Firebase: #{deploy}") + + # Clean + gradle( + task: "clean", + project_dir: "./android" + ) + + # Build the AAB + gradle( + task: "assemble", + build_type: "Release", + project_dir: "./android" + ) + + Dir.chdir('..') do + sh("mkdir -p #{build_output_directory} && mv -f #{lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]} #{apk_path}") + end + + if deploy + latest_app_distribution_release = firebase_app_distribution_get_latest_release( + app: firebase_app_id, + service_credentials_file: firebase_credentials_file + ) + + # Handle case when no previous releases exist + if latest_app_distribution_release.nil? || latest_app_distribution_release.empty? + puts "No previous releases found. Starting with version code 1" + latest_app_distribution_version_code = 0 # Will be incremented to 1 + else + latest_app_distribution_version_code = latest_app_distribution_release[:buildVersion].to_i + puts "Latest version code from App Distribution: #{latest_app_distribution_version_code}" + end + + increment_version_code( + gradle_file_path: "./android/app/build.gradle", + version_code: latest_app_distribution_version_code + 1 + ) + + # Upload to Firebase App Distribution + firebase_app_distribution( + app: firebase_app_id, + service_credentials_file: firebase_credentials_file, + android_artifact_path: apk_path, + android_artifact_type: "APK", + groups: "stream-testers" + ) + else + UI.message("Skipping Firebase upload! (deploy: #{deploy})") + end + end +end + ########################## ###### Common lanes ###### ########################## diff --git a/examples/SampleApp/fastlane/Pluginfile b/examples/SampleApp/fastlane/Pluginfile index 5cb59d45fd..83eadf02f3 100644 --- a/examples/SampleApp/fastlane/Pluginfile +++ b/examples/SampleApp/fastlane/Pluginfile @@ -5,3 +5,4 @@ gem 'fastlane-plugin-firebase_app_distribution' gem 'fastlane-plugin-load_json' gem 'fastlane-plugin-stream_actions', '0.3.73' +gem 'fastlane-plugin-increment_version_code' diff --git a/examples/SampleApp/package.json b/examples/SampleApp/package.json index 5da8d63f2a..8af1d0de86 100644 --- a/examples/SampleApp/package.json +++ b/examples/SampleApp/package.json @@ -20,7 +20,11 @@ "release-next": "echo \"Skipping next release for SampleApp\"", "test:unit": "echo \"Skipping unit tests for SampleApp\"", "clean": "watchman watch-del-all && yarn cache clean && rm -rf ios/build && pod cache clean --all && rm -rf android/build && cd android && ./gradlew clean && cd -", - "clean-all": "yarn clean && rm -rf node_modules && rm -rf ios/Pods && rm -rf vendor && bundle install && yarn install && cd ios && bundle exec pod install && cd -" + "clean-all": "yarn clean && rm -rf node_modules && rm -rf ios/Pods && rm -rf vendor && bundle install && yarn install && cd ios && bundle exec pod install && cd -", + "fastlane:android-build": "bundle exec fastlane android firebase_build_and_upload deploy:false", + "fastlane:android-deploy": "bundle exec fastlane android firebase_build_and_upload deploy:true", + "fastlane:ios-build": "bundle exec fastlane ios deploy_to_testflight_qa deploy:false", + "fastlane:ios-deploy": "bundle exec fastlane ios deploy_to_testflight_qa deploy:true" }, "dependencies": { "@emoji-mart/data": "^1.2.1", From 807162ef543a6942296d7f39167d22665ca286e6 Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Thu, 18 Dec 2025 13:59:02 +0530 Subject: [PATCH 02/19] chore: add android build and deploy workflows and improve ios workflow --- examples/SampleApp/fastlane/Fastfile | 29 +++++----------------------- 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/examples/SampleApp/fastlane/Fastfile b/examples/SampleApp/fastlane/Fastfile index c30b1e6c15..338112fb2b 100644 --- a/examples/SampleApp/fastlane/Fastfile +++ b/examples/SampleApp/fastlane/Fastfile @@ -115,11 +115,11 @@ platform :android do UI.message("Deploying to Firebase: #{deploy}") - # Clean - gradle( - task: "clean", - project_dir: "./android" - ) + # # Clean + # gradle( + # task: "clean", + # project_dir: "./android" + # ) # Build the AAB gradle( @@ -133,25 +133,6 @@ platform :android do end if deploy - latest_app_distribution_release = firebase_app_distribution_get_latest_release( - app: firebase_app_id, - service_credentials_file: firebase_credentials_file - ) - - # Handle case when no previous releases exist - if latest_app_distribution_release.nil? || latest_app_distribution_release.empty? - puts "No previous releases found. Starting with version code 1" - latest_app_distribution_version_code = 0 # Will be incremented to 1 - else - latest_app_distribution_version_code = latest_app_distribution_release[:buildVersion].to_i - puts "Latest version code from App Distribution: #{latest_app_distribution_version_code}" - end - - increment_version_code( - gradle_file_path: "./android/app/build.gradle", - version_code: latest_app_distribution_version_code + 1 - ) - # Upload to Firebase App Distribution firebase_app_distribution( app: firebase_app_id, From b1091d276f2448f1e1e1782a428ff21e2a1beb7c Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Thu, 18 Dec 2025 14:03:58 +0530 Subject: [PATCH 03/19] fix: remove irrelevant plugin --- examples/SampleApp/.gitignore | 2 +- examples/SampleApp/Gemfile.lock | 2 -- examples/SampleApp/fastlane/Pluginfile | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/SampleApp/.gitignore b/examples/SampleApp/.gitignore index 61f08e514a..7388cefebf 100644 --- a/examples/SampleApp/.gitignore +++ b/examples/SampleApp/.gitignore @@ -76,4 +76,4 @@ yarn-error.log # Credentials credentials/ -app-build/ \ No newline at end of file +app-build/ diff --git a/examples/SampleApp/Gemfile.lock b/examples/SampleApp/Gemfile.lock index 1c1b142e57..83479ab205 100644 --- a/examples/SampleApp/Gemfile.lock +++ b/examples/SampleApp/Gemfile.lock @@ -164,7 +164,6 @@ GEM fastlane-plugin-firebase_app_distribution (0.9.1) google-apis-firebaseappdistribution_v1 (~> 0.3.0) google-apis-firebaseappdistribution_v1alpha (~> 0.2.0) - fastlane-plugin-increment_version_code (0.4.3) fastlane-plugin-load_json (0.0.1) fastlane-plugin-stream_actions (0.3.73) xctest_list (= 1.2.1) @@ -327,7 +326,6 @@ DEPENDENCIES concurrent-ruby (< 1.3.4) fastlane fastlane-plugin-firebase_app_distribution - fastlane-plugin-increment_version_code fastlane-plugin-load_json fastlane-plugin-stream_actions (= 0.3.73) logger diff --git a/examples/SampleApp/fastlane/Pluginfile b/examples/SampleApp/fastlane/Pluginfile index 83eadf02f3..5cb59d45fd 100644 --- a/examples/SampleApp/fastlane/Pluginfile +++ b/examples/SampleApp/fastlane/Pluginfile @@ -5,4 +5,3 @@ gem 'fastlane-plugin-firebase_app_distribution' gem 'fastlane-plugin-load_json' gem 'fastlane-plugin-stream_actions', '0.3.73' -gem 'fastlane-plugin-increment_version_code' From 31d1e9cc1c8c45efebc273b59dae38c6f5c80960 Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Thu, 18 Dec 2025 15:13:58 +0530 Subject: [PATCH 04/19] fix: change firebase app id --- examples/SampleApp/fastlane/Fastfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/SampleApp/fastlane/Fastfile b/examples/SampleApp/fastlane/Fastfile index 338112fb2b..579709d8db 100644 --- a/examples/SampleApp/fastlane/Fastfile +++ b/examples/SampleApp/fastlane/Fastfile @@ -15,7 +15,7 @@ output_ipa_name = "reactnativesampleapp.ipa" # Android Platform Configuration package_name = 'io.getstream.reactnative.sampleapp' -firebase_app_id = "1:860064972837:android:45442c1123323ac9f17fcc" +firebase_app_id = "1:674907137625:android:cba499ae72f6ee4bd7f348" firebase_credentials_file = "./credentials/firebase-credentials.json" output_apk_name = "reactnativesampleapp.apk" apk_path = "#{build_output_directory}/#{output_apk_name}" @@ -115,11 +115,11 @@ platform :android do UI.message("Deploying to Firebase: #{deploy}") - # # Clean - # gradle( - # task: "clean", - # project_dir: "./android" - # ) + # Clean + gradle( + task: "clean", + project_dir: "./android" + ) # Build the AAB gradle( From af6865b3cb194281051c1873d143d95c58a7cc86 Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Thu, 18 Dec 2025 16:47:31 +0530 Subject: [PATCH 05/19] chore: fix ci --- .github/workflows/sample-distribution.yml | 29 ++++++----------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/.github/workflows/sample-distribution.yml b/.github/workflows/sample-distribution.yml index 981c8bb2c6..dc71f6004b 100644 --- a/.github/workflows/sample-distribution.yml +++ b/.github/workflows/sample-distribution.yml @@ -17,7 +17,7 @@ jobs: runs-on: [macos-15] strategy: matrix: - node-version: [ 24.x ] + node-version: [24.x] steps: - name: Connect Bot uses: webfactory/ssh-agent@v0.7.0 @@ -57,12 +57,12 @@ jobs: MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }} - build_and_deploy_android_s3: + build_and_deploy_android_firebase: name: Build SampleApp Android and Deploy-${{ github.ref == 'refs/heads/develop' }} runs-on: ubuntu-latest strategy: matrix: - node-version: [ 24.x ] + node-version: [24.x] steps: - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 @@ -78,22 +78,7 @@ jobs: uses: ./.github/actions/install-and-build-sdk - name: Build working-directory: examples/SampleApp - run: | - mkdir android/app/src/main/assets - mkdir tmp - yarn react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest tmp - cd android - rm -rf $HOME/.gradle/caches/ && ./gradlew assembleRelease - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - if: ${{ github.ref == 'refs/heads/develop' }} - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - name: Upload APK - if: ${{ github.ref == 'refs/heads/develop' }} - # https://getstream.io/downloads/rn-sample-app.apk - run: | - cp examples/SampleApp/android/app/build/outputs/apk/release/app-release.apk rn-sample-app.apk - aws s3 cp rn-sample-app.apk s3://${{ secrets.AWS_S3_BUCKET }} --sse AES256 + run: bundle exec fastlane android firebase_build_and_upload deploy:${{ github.ref == 'refs/heads/develop' }}; + env: + ANDROID_FIREBASE_APP_ID: ${{ secrets.ANDROID_FIREBASE_APP_ID }} + FIREBASE_CREDENTIALS_JSON: ${{ secrets.FIREBASE_CREDENTIALS_JSON }} From 0ec32c1687956d00315366db455d51a4a6b67edf Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Thu, 18 Dec 2025 16:47:57 +0530 Subject: [PATCH 06/19] chore: fix ci --- examples/SampleApp/fastlane/Fastfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/SampleApp/fastlane/Fastfile b/examples/SampleApp/fastlane/Fastfile index 579709d8db..321188bab7 100644 --- a/examples/SampleApp/fastlane/Fastfile +++ b/examples/SampleApp/fastlane/Fastfile @@ -15,8 +15,6 @@ output_ipa_name = "reactnativesampleapp.ipa" # Android Platform Configuration package_name = 'io.getstream.reactnative.sampleapp' -firebase_app_id = "1:674907137625:android:cba499ae72f6ee4bd7f348" -firebase_credentials_file = "./credentials/firebase-credentials.json" output_apk_name = "reactnativesampleapp.apk" apk_path = "#{build_output_directory}/#{output_apk_name}" @@ -135,8 +133,8 @@ platform :android do if deploy # Upload to Firebase App Distribution firebase_app_distribution( - app: firebase_app_id, - service_credentials_file: firebase_credentials_file, + app: ENV.fetch('ANDROID_FIREBASE_APP_ID', nil), + service_credentials_json: ENV.fetch('FIREBASE_CREDENTIALS_JSON', nil), android_artifact_path: apk_path, android_artifact_type: "APK", groups: "stream-testers" From a804ab55ca616617fe4ded9eaebee5f246cb13d3 Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Thu, 18 Dec 2025 16:56:31 +0530 Subject: [PATCH 07/19] chore: fix ci --- .github/workflows/sample-distribution.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sample-distribution.yml b/.github/workflows/sample-distribution.yml index dc71f6004b..e419f66339 100644 --- a/.github/workflows/sample-distribution.yml +++ b/.github/workflows/sample-distribution.yml @@ -74,9 +74,10 @@ jobs: distribution: 'zulu' java-version: '17' check-latest: true + - uses: ./.github/actions/ruby-cache - name: Install && Build - SDK and Sample App uses: ./.github/actions/install-and-build-sdk - - name: Build + - name: Build and deploy Android Firebase working-directory: examples/SampleApp run: bundle exec fastlane android firebase_build_and_upload deploy:${{ github.ref == 'refs/heads/develop' }}; env: From 8c3e52d802d18069fe5040e9f8c14c15708a1dfb Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Thu, 18 Dec 2025 17:01:07 +0530 Subject: [PATCH 08/19] chore: fix ci --- .github/workflows/sample-distribution.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sample-distribution.yml b/.github/workflows/sample-distribution.yml index e419f66339..410292fdbd 100644 --- a/.github/workflows/sample-distribution.yml +++ b/.github/workflows/sample-distribution.yml @@ -51,7 +51,7 @@ jobs: bundle exec pod install - name: Build and release Testflight QA working-directory: examples/SampleApp - run: bundle exec fastlane deploy_to_testflight_qa deploy:${{ github.ref == 'refs/heads/develop' }}; + run: bundle exec fastlane ios deploy_to_testflight_qa deploy:${{ github.ref == 'refs/heads/develop' }}; env: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} From c5a35fd31d42109eb9f1114d8b97ec8adb48e27a Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Fri, 19 Dec 2025 11:09:48 +0530 Subject: [PATCH 09/19] chore: actions spliting --- .../actions/install-and-build-sdk/action.yml | 5 -- .github/workflows/sample-distribution.yml | 46 +++++++++++++------ 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/.github/actions/install-and-build-sdk/action.yml b/.github/actions/install-and-build-sdk/action.yml index 5ba82e4bc2..f79f913aa5 100644 --- a/.github/actions/install-and-build-sdk/action.yml +++ b/.github/actions/install-and-build-sdk/action.yml @@ -16,11 +16,6 @@ runs: cd package/native-package/ yarn shell: bash - - name: Install & Build the Expo Package - run: | - cd package/expo-package/ - yarn - shell: bash - name: Install & Build the Sample App working-directory: examples/SampleApp run: yarn diff --git a/.github/workflows/sample-distribution.yml b/.github/workflows/sample-distribution.yml index 410292fdbd..82e9bc82ce 100644 --- a/.github/workflows/sample-distribution.yml +++ b/.github/workflows/sample-distribution.yml @@ -12,28 +12,47 @@ on: - 'examples/SampleApp/**' jobs: + prepare_sdk: + name: Prepare SDK & JS Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v4 + with: + node-version: 24.x + - uses: ./.github/actions/ruby-cache + - name: Install & build SDK + uses: ./.github/actions/install-and-build-sdk + - name: Upload SDK artifact + uses: actions/upload-artifact@v4 + with: + name: sdk-build + path: | + - package/** + - examples/SampleApp/** + build_and_deploy_ios_testflight_qa: name: Build SampleApp iOS and Deploy-${{ github.ref == 'refs/heads/develop' }} + needs: prepare_sdk runs-on: [macos-15] strategy: matrix: node-version: [24.x] steps: + - uses: actions/checkout@v4 + + - uses: actions/download-artifact@v4 + with: + name: sdk-build - name: Connect Bot uses: webfactory/ssh-agent@v0.7.0 with: ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - uses: actions/checkout@v3 + - uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: '16.4.0' # Update as needed - uses: ./.github/actions/ruby-cache - - name: Install && Build - SDK and Sample App - uses: ./.github/actions/install-and-build-sdk - name: Cache iOS pods uses: actions/cache@v4 with: @@ -59,24 +78,25 @@ jobs: build_and_deploy_android_firebase: name: Build SampleApp Android and Deploy-${{ github.ref == 'refs/heads/develop' }} + needs: prepare_sdk runs-on: ubuntu-latest + env: + GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.caching=false' + FASTLANE_SKIP_UPDATE_CHECK: 'true' strategy: matrix: node-version: [24.x] steps: - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v4 with: - node-version: ${{ matrix.node-version }} - - uses: actions/checkout@v2 + name: sdk-build - uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: '17' check-latest: true - uses: ./.github/actions/ruby-cache - - name: Install && Build - SDK and Sample App - uses: ./.github/actions/install-and-build-sdk - name: Build and deploy Android Firebase working-directory: examples/SampleApp run: bundle exec fastlane android firebase_build_and_upload deploy:${{ github.ref == 'refs/heads/develop' }}; From c82065b22751fa51a8037c0a2cf997f268869059 Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Fri, 19 Dec 2025 11:16:14 +0530 Subject: [PATCH 10/19] chore: actions spliting --- .github/workflows/sample-distribution.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/sample-distribution.yml b/.github/workflows/sample-distribution.yml index 82e9bc82ce..9d16af7a75 100644 --- a/.github/workflows/sample-distribution.yml +++ b/.github/workflows/sample-distribution.yml @@ -27,9 +27,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: sdk-build - path: | - - package/** - - examples/SampleApp/** + path: . build_and_deploy_ios_testflight_qa: name: Build SampleApp iOS and Deploy-${{ github.ref == 'refs/heads/develop' }} From e5ba91ee2aeeeb76affee538a14852779f2aac6e Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Fri, 19 Dec 2025 11:24:17 +0530 Subject: [PATCH 11/19] chore: actions spliting --- .github/workflows/sample-distribution.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sample-distribution.yml b/.github/workflows/sample-distribution.yml index 9d16af7a75..600f8e8555 100644 --- a/.github/workflows/sample-distribution.yml +++ b/.github/workflows/sample-distribution.yml @@ -27,7 +27,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: sdk-build - path: . + path: examples/SampleApp/** build_and_deploy_ios_testflight_qa: name: Build SampleApp iOS and Deploy-${{ github.ref == 'refs/heads/develop' }} From e8af5f53aa3ef3b845f64011950c30567befe5ac Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Fri, 19 Dec 2025 11:34:08 +0530 Subject: [PATCH 12/19] chore: actions spliting --- .github/workflows/sample-distribution.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/sample-distribution.yml b/.github/workflows/sample-distribution.yml index 600f8e8555..a09a9b9303 100644 --- a/.github/workflows/sample-distribution.yml +++ b/.github/workflows/sample-distribution.yml @@ -78,9 +78,6 @@ jobs: name: Build SampleApp Android and Deploy-${{ github.ref == 'refs/heads/develop' }} needs: prepare_sdk runs-on: ubuntu-latest - env: - GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.caching=false' - FASTLANE_SKIP_UPDATE_CHECK: 'true' strategy: matrix: node-version: [24.x] From d7bab35b515e3316d68e2d463d0b165509ff9dda Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Fri, 19 Dec 2025 12:02:08 +0530 Subject: [PATCH 13/19] revert: changes --- .github/workflows/sample-distribution.yml | 41 +++++++---------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/.github/workflows/sample-distribution.yml b/.github/workflows/sample-distribution.yml index a09a9b9303..410292fdbd 100644 --- a/.github/workflows/sample-distribution.yml +++ b/.github/workflows/sample-distribution.yml @@ -12,45 +12,28 @@ on: - 'examples/SampleApp/**' jobs: - prepare_sdk: - name: Prepare SDK & JS Build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v4 - with: - node-version: 24.x - - uses: ./.github/actions/ruby-cache - - name: Install & build SDK - uses: ./.github/actions/install-and-build-sdk - - name: Upload SDK artifact - uses: actions/upload-artifact@v4 - with: - name: sdk-build - path: examples/SampleApp/** - build_and_deploy_ios_testflight_qa: name: Build SampleApp iOS and Deploy-${{ github.ref == 'refs/heads/develop' }} - needs: prepare_sdk runs-on: [macos-15] strategy: matrix: node-version: [24.x] steps: - - uses: actions/checkout@v4 - - - uses: actions/download-artifact@v4 - with: - name: sdk-build - name: Connect Bot uses: webfactory/ssh-agent@v0.7.0 with: ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} - + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - uses: actions/checkout@v3 - uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: '16.4.0' # Update as needed - uses: ./.github/actions/ruby-cache + - name: Install && Build - SDK and Sample App + uses: ./.github/actions/install-and-build-sdk - name: Cache iOS pods uses: actions/cache@v4 with: @@ -76,22 +59,24 @@ jobs: build_and_deploy_android_firebase: name: Build SampleApp Android and Deploy-${{ github.ref == 'refs/heads/develop' }} - needs: prepare_sdk runs-on: ubuntu-latest strategy: matrix: node-version: [24.x] steps: - - uses: actions/checkout@v3 - - uses: actions/download-artifact@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 with: - name: sdk-build + node-version: ${{ matrix.node-version }} + - uses: actions/checkout@v2 - uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: '17' check-latest: true - uses: ./.github/actions/ruby-cache + - name: Install && Build - SDK and Sample App + uses: ./.github/actions/install-and-build-sdk - name: Build and deploy Android Firebase working-directory: examples/SampleApp run: bundle exec fastlane android firebase_build_and_upload deploy:${{ github.ref == 'refs/heads/develop' }}; From b0268fb12a32026afcd916242aa1b562736db8e4 Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Mon, 29 Dec 2025 15:30:57 +0530 Subject: [PATCH 14/19] chore: increase android runner storage --- .github/workflows/sample-distribution.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sample-distribution.yml b/.github/workflows/sample-distribution.yml index 410292fdbd..3093f7b6ff 100644 --- a/.github/workflows/sample-distribution.yml +++ b/.github/workflows/sample-distribution.yml @@ -59,7 +59,7 @@ jobs: build_and_deploy_android_firebase: name: Build SampleApp Android and Deploy-${{ github.ref == 'refs/heads/develop' }} - runs-on: ubuntu-latest + runs-on: ubuntu-latest-16core strategy: matrix: node-version: [24.x] From b80831947f684c00e9d5e9124766a71ddceac776 Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Mon, 29 Dec 2025 15:38:50 +0530 Subject: [PATCH 15/19] chore: change runner to a self hosted one --- .github/workflows/sample-distribution.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sample-distribution.yml b/.github/workflows/sample-distribution.yml index 3093f7b6ff..4cddbcf350 100644 --- a/.github/workflows/sample-distribution.yml +++ b/.github/workflows/sample-distribution.yml @@ -59,7 +59,7 @@ jobs: build_and_deploy_android_firebase: name: Build SampleApp Android and Deploy-${{ github.ref == 'refs/heads/develop' }} - runs-on: ubuntu-latest-16core + runs-on: streamci-157.180.50.234-htz-helsinki-b strategy: matrix: node-version: [24.x] From b272af51ae1924584fbc333b86554fff489c1c96 Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Tue, 30 Dec 2025 14:30:25 +0530 Subject: [PATCH 16/19] chore: change runner to a public runner --- .github/workflows/sample-distribution.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sample-distribution.yml b/.github/workflows/sample-distribution.yml index 4cddbcf350..e71b820859 100644 --- a/.github/workflows/sample-distribution.yml +++ b/.github/workflows/sample-distribution.yml @@ -59,7 +59,7 @@ jobs: build_and_deploy_android_firebase: name: Build SampleApp Android and Deploy-${{ github.ref == 'refs/heads/develop' }} - runs-on: streamci-157.180.50.234-htz-helsinki-b + runs-on: public strategy: matrix: node-version: [24.x] From 769f710e980ecbc211a90af26ddb61b0cfa1801c Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Tue, 30 Dec 2025 14:47:52 +0530 Subject: [PATCH 17/19] chore: setup android sdk --- .github/workflows/sample-distribution.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/sample-distribution.yml b/.github/workflows/sample-distribution.yml index e71b820859..87600b6912 100644 --- a/.github/workflows/sample-distribution.yml +++ b/.github/workflows/sample-distribution.yml @@ -74,6 +74,9 @@ jobs: distribution: 'zulu' java-version: '17' check-latest: true + - name: Setup Android SDK + uses: amyu/setup-android@v5 + - uses: ./.github/actions/ruby-cache - name: Install && Build - SDK and Sample App uses: ./.github/actions/install-and-build-sdk From 8c92dcaad9a35ee39d93501ba71b396ea1e741fb Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Tue, 30 Dec 2025 15:14:04 +0530 Subject: [PATCH 18/19] chore: try out other actions on public runner --- .github/workflows/check-pr.yml | 2 +- .github/workflows/release.yml | 12 ++++++------ .github/workflows/sdk-size-metrics.yml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index 4e5656143d..98113381d5 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -10,7 +10,7 @@ on: jobs: check_pr: - runs-on: ubuntu-latest + runs-on: public strategy: matrix: node-version: [24.x] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c524c794a2..d782fa42e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,13 +7,13 @@ on: # - develop permissions: - id-token: write # for OIDC / npm provenance if you use it - actions: write # if you dispatch other workflows - contents: write # commits / tags / merge-back + id-token: write # for OIDC / npm provenance if you use it + actions: write # if you dispatch other workflows + contents: write # commits / tags / merge-back jobs: publish: - runs-on: ubuntu-latest + runs-on: public strategy: matrix: node-version: [24.x] @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - fetch-depth: "0" + fetch-depth: '0' - name: Fetch tags run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* @@ -30,7 +30,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - registry-url: "https://registry.npmjs.org" + registry-url: 'https://registry.npmjs.org' - name: Prepare git run: | diff --git a/.github/workflows/sdk-size-metrics.yml b/.github/workflows/sdk-size-metrics.yml index 775c1986b2..4efc59e442 100644 --- a/.github/workflows/sdk-size-metrics.yml +++ b/.github/workflows/sdk-size-metrics.yml @@ -16,7 +16,7 @@ env: jobs: sdk_size: name: Metrics - runs-on: ubuntu-latest + runs-on: public steps: - name: Connect Bot uses: webfactory/ssh-agent@v0.7.0 From 00c07e2f808a30335d9163f62b3db7aea26b1fa1 Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Tue, 30 Dec 2025 15:15:41 +0530 Subject: [PATCH 19/19] chore: try out other actions on public runner --- .github/workflows/sdk-size-metrics.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sdk-size-metrics.yml b/.github/workflows/sdk-size-metrics.yml index 4efc59e442..775c1986b2 100644 --- a/.github/workflows/sdk-size-metrics.yml +++ b/.github/workflows/sdk-size-metrics.yml @@ -16,7 +16,7 @@ env: jobs: sdk_size: name: Metrics - runs-on: public + runs-on: ubuntu-latest steps: - name: Connect Bot uses: webfactory/ssh-agent@v0.7.0