feat: action try to upload as completed before draft

This commit is contained in:
Malo Léon 2023-08-10 13:05:32 +02:00
parent fea0c153d4
commit 71299744da

View File

@ -25,15 +25,29 @@ module Fastlane
UI.message("👉🏼 App built")
# Upload the Android App Bundle to the Play Store
other_action.upload_to_play_store(
track: params[:beta_type],
json_key: './service_account_key.json',
aab: '../build/app/outputs/bundle/release/app-release.aab',
skip_upload_metadata: true,
skip_upload_images: true,
skip_upload_screenshots: true,
release_status: "draft"
)
begin
other_action.upload_to_play_store(
track: params[:beta_type],
json_key: './service_account_key.json',
aab: '../build/app/outputs/bundle/release/app-release.aab',
skip_upload_metadata: true,
skip_upload_images: true,
skip_upload_screenshots: true,
release_status: "completed"
)
rescue StandardError => e
UI.message("👉🏼 Unable to upload as completed; try to upload it in draft status")
other_action.upload_to_play_store(
track: params[:beta_type],
json_key: './service_account_key.json',
aab: '../build/app/outputs/bundle/release/app-release.aab',
skip_upload_metadata: true,
skip_upload_images: true,
skip_upload_screenshots: true,
release_status: "draft"
)
end
# Delete artifacts files
artifacts = ['android_keys.zip', 'key.jks', 'key.properties', 'service_account_key.json']