Skip to content

Commit

Permalink
Write some more logic to update Android rollouts
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGable committed Nov 12, 2024
1 parent f9ed151 commit 9ac400f
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/androidBump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
11 changes: 8 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down Expand Up @@ -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
Expand Down
36 changes: 36 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9ac400f

Please sign in to comment.