Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Commit b873702

Browse files
committed
Add lanes for building and uploading app releases
1 parent 44351d7 commit b873702

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

fastlane/Fastfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,41 @@ PROTOTYPE_BUILD_DOMAIN = 'https://cdn.a8c-ci.services'
2121
PROTOTYPE_BUILD_TYPE = 'release'
2222

2323
platform :android do
24+
# Builds a release app bundle .aab
25+
#
26+
lane :build_bundle do
27+
gradle(task: 'clean')
28+
29+
gradle(
30+
task: 'bundle',
31+
build_type: 'Release'
32+
)
33+
end
34+
35+
# Uploads the app bundle to the Google Play Store
36+
#
37+
# @param track [String] The track to upload to. One of: 'internal', 'alpha', 'beta', 'production'. Defaults to 'internal'
38+
# @param release_status [String] The release status. One of: 'completed', 'draft', 'halted', 'inProgress'. Defaults to 'completed'
39+
# @param rollout [String] The percentage of users who should get the update, as a string between '0' and '1'. Defaults to '1'
40+
# @env [String] PLAY_STORE_RAW_JSON_KEY The Google Play Store service account JSON key data
41+
#
42+
lane :upload_to_store do |track: 'internal', release_status: 'completed', rollout: '1'|
43+
require_env_vars!('PLAY_STORE_RAW_JSON_KEY')
44+
45+
upload_to_play_store(
46+
package_name: 'com.gravatar.app',
47+
aab: File.join(PROJECT_ROOT_FOLDER, 'app', 'build', 'outputs', 'bundle', 'release', 'app-release.aab'),
48+
track: track,
49+
release_status: release_status,
50+
rollout: rollout,
51+
skip_upload_metadata: (track != 'production'),
52+
skip_upload_changelogs: true,
53+
skip_upload_images: true,
54+
skip_upload_screenshots: true,
55+
json_key_data: get_required_env!('PLAY_STORE_RAW_JSON_KEY')
56+
)
57+
end
58+
2459
# Builds the Gravatar Demo app prototype APK, uploads it to S3, and posts a download link as a comment on the associated pull request.
2560
#
2661
# Intended for use in CI to provide reviewers with an installable build for testing.

0 commit comments

Comments
 (0)