diff --git a/.github/workflows/androidBump.yml b/.github/workflows/androidBump.yml index cdc32d2651e9..da41798300b4 100644 --- a/.github/workflows/androidBump.yml +++ b/.github/workflows/androidBump.yml @@ -31,7 +31,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update Rollout Percentage with Fastlane + if: ${{ steps.checkAndroidStatus.outputs.HALTED == 'false' }} run: | - # TODO: Write a fastlane lane to bump given a percentage echo "HALTED: ${{ steps.checkAndroidStatus.outputs.HALTED }}" echo "ROLLOUT_PERCENTAGE: ${{ steps.checkAndroidStatus.outputs.ROLLOUT_PERCENTAGE }}" + bundle exec fastlane android update_hybrid_rollout rollout:${{ steps.checkAndroidStatus.outputs.ROLLOUT_PERCENTAGE }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ec2749b95edb..1447bbf20c6d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -263,9 +263,14 @@ jobs: env: VERSION: ${{ steps.getAndroidVersion.outputs.VERSION_CODE }} - - name: Submit Android build for review + - name: Submit production build for Google Play review and a slow rollout if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} - run: bundle exec fastlane android upload_google_play_production_hybrid_rollout + run: | + # Complete the previous version rollout + bundle exec fastlane android complete_hybrid_rollout + + # Submit the new version for review and slow rollout when it's approved + bundle exec fastlane android upload_google_play_production_hybrid_rollout env: VERSION: ${{ steps.getAndroidVersion.outputs.VERSION_CODE }} @@ -600,7 +605,7 @@ jobs: if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} run: | # Complete the previous version rollout - complete_hybrid_rollout + bundle exec fastlane ios complete_hybrid_rollout # Submit the new version for review and phased rollout when it's approved bundle exec fastlane ios submit_hybrid_for_rollout diff --git a/fastlane/Fastfile b/fastlane/Fastfile index eef7e311556a..748ab9462084 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -262,6 +262,42 @@ platform :android do skip_upload_screenshots: true ) end + + desc "Submit HybridApp to 100% rollout on Google Play" + lane :complete_hybrid_rollout do + productionVersionCode = google_play_track_version_codes(track: 'production') + upload_to_play_store( + package_name: "org.me.mobiexpensifyg", + json_key: './android/app/android-fastlane-json-key.json', + version_code: productionVersionCode, + track: 'production', + rollout: '1', + skip_upload_apk: true, + skip_upload_aab: true, + skip_upload_metadata: true, + skip_upload_changelogs: true, + skip_upload_images: true, + skip_upload_screenshots: true + ) + end + + desc "Update HybridApp rollout percentage on Google Play" + lane :update_hybrid_rollout do |options| + productionVersionCode = google_play_track_version_codes(track: 'production') + upload_to_play_store( + package_name: "org.me.mobiexpensifyg", + json_key: './android/app/android-fastlane-json-key.json', + version_code: productionVersionCode, + track: 'production', + rollout: options[:rollout], + skip_upload_apk: true, + skip_upload_aab: true, + skip_upload_metadata: true, + skip_upload_changelogs: true, + skip_upload_images: true, + skip_upload_screenshots: true + ) + end end def setupIOSSigningCertificate()