The 1.79.0 listing includes ja, so Fastlane rejected submit_review when release-summary.json had no Japanese notes. Fail in store-delivery and Fastfile instead of creating a stuck draft.
50 lines
1.6 KiB
Ruby
50 lines
1.6 KiB
Ruby
opt_out_usage
|
|
|
|
default_platform(:ios)
|
|
|
|
platform :ios do
|
|
desc "Submit an uploaded App Store Connect build to App Review and release it automatically after approval"
|
|
lane :submit_review do
|
|
version = ENV.fetch("APP_STORE_VERSION")
|
|
build_number = ENV.fetch("APP_STORE_BUILD_NUMBER")
|
|
notes_zh = ENV["APP_STORE_RELEASE_NOTES_ZH"].to_s.strip
|
|
notes_en = ENV["APP_STORE_RELEASE_NOTES_EN"].to_s.strip
|
|
has_notes = notes_zh != "" && notes_en != ""
|
|
release_notes = has_notes ? { "zh-Hans" => notes_zh, "en-US" => notes_en } : nil
|
|
if has_notes
|
|
notes_ja = ENV["APP_STORE_RELEASE_NOTES_JA"].to_s.strip
|
|
if notes_ja == ""
|
|
UI.user_error!(
|
|
"APP_STORE_RELEASE_NOTES_JA is required because the App Store listing includes Japanese What's New.",
|
|
)
|
|
end
|
|
release_notes["ja"] = notes_ja
|
|
end
|
|
|
|
api_key = app_store_connect_api_key(
|
|
key_id: ENV.fetch("APP_STORE_CONNECT_API_KEY_ID"),
|
|
issuer_id: ENV.fetch("APP_STORE_CONNECT_API_ISSUER_ID"),
|
|
key_content: ENV.fetch("APP_STORE_CONNECT_API_KEY_P8_BASE64"),
|
|
is_key_content_base64: true,
|
|
in_house: false
|
|
)
|
|
|
|
deliver(
|
|
api_key: api_key,
|
|
app_identifier: "org.edgeever.mobile",
|
|
app_version: version,
|
|
build_number: build_number,
|
|
submit_for_review: true,
|
|
automatic_release: true,
|
|
phased_release: false,
|
|
force: true,
|
|
skip_binary_upload: true,
|
|
skip_metadata: !has_notes,
|
|
skip_screenshots: true,
|
|
release_notes: release_notes,
|
|
run_precheck_before_submit: false,
|
|
precheck_include_in_app_purchases: false
|
|
)
|
|
end
|
|
end
|