feat(release): add fastlane ship lanes and end-to-end release pipeline docs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jjbruntonandClaude Fable 5 committed 2026-08-31 11:32:32 +01:00
1 parent 8bf93f372b
commit 2b05e50312
9 files changed
+490 -330

No files matched your search

+82
View File
@@ -45,4 +45,86 @@ platform :android do
lane :upload_beta do |options|
upload(options.merge(track: "beta"))
end
desc "Upload AAB and release it: commits the release on the given track (default production), triggering Play review and rollout on approval"
lane :release do |options|
track = options[:track] || "production"
project_root = File.expand_path("..", __dir__)
aab_path = options[:aab]
UI.user_error!("Pass the exact verified artifact with aab: — never release an implicit build") unless aab_path
aab_path = File.expand_path(aab_path, project_root) unless aab_path.start_with?("/")
UI.user_error!("AAB not found at #{aab_path}") unless File.exist?(aab_path)
rollout = options[:rollout] # e.g. "0.1" for 10% staged rollout; omit for full rollout
UI.message("Releasing #{aab_path} to #{track} track#{rollout ? " at #{(rollout.to_f * 100).round}% rollout" : " at full rollout"}...")
upload_to_play_store(
track: track,
aab: aab_path,
skip_upload_metadata: true,
skip_upload_images: true,
skip_upload_screenshots: true,
skip_upload_changelogs: false,
release_status: rollout ? "inProgress" : "completed",
rollout: rollout,
)
UI.success("Release committed to #{track}. Google Play review runs automatically; rollout proceeds on approval.")
end
end
platform :ios do
# App Store Connect API key, supplied via environment (never committed):
# ASC_KEY_ID, ASC_ISSUER_ID, ASC_KEY_PATH (path to the .p8 file)
private_lane :asc_api_key do
UI.user_error!("Set ASC_KEY_ID, ASC_ISSUER_ID, and ASC_KEY_PATH") unless ENV["ASC_KEY_ID"] && ENV["ASC_ISSUER_ID"] && ENV["ASC_KEY_PATH"]
app_store_connect_api_key(
key_id: ENV["ASC_KEY_ID"],
issuer_id: ENV["ASC_ISSUER_ID"],
key_filepath: ENV["ASC_KEY_PATH"],
)
end
desc "Upload IPA to App Store Connect / TestFlight only (no App Review submission)"
lane :upload do |options|
ipa_path = options[:ipa]
UI.user_error!("Pass the exact verified artifact with ipa:") unless ipa_path && File.exist?(File.expand_path(ipa_path))
upload_to_testflight(
api_key: asc_api_key,
ipa: File.expand_path(ipa_path),
skip_waiting_for_build_processing: false,
)
UI.success("Uploaded to App Store Connect; build is processing for TestFlight.")
end
desc "Upload IPA, create the App Store version, and submit it for App Review with automatic release on approval"
lane :release do |options|
ipa_path = options[:ipa]
UI.user_error!("Pass the exact verified artifact with ipa:") unless ipa_path && File.exist?(File.expand_path(ipa_path))
api_key = asc_api_key
upload_to_app_store(
api_key: api_key,
ipa: File.expand_path(ipa_path),
submit_for_review: true,
automatic_release: options.fetch(:automatic_release, true),
phased_release: options.fetch(:phased_release, false),
precheck_include_in_app_purchases: false,
# Metadata lives in App Store Connect; only release notes change per version.
skip_metadata: options[:release_notes].nil?,
skip_screenshots: true,
release_notes: options[:release_notes] ? { "en-GB" => options[:release_notes], "default" => options[:release_notes] } : nil,
submission_information: {
add_id_info_uses_idfa: false,
export_compliance_uses_encryption: false,
},
force: true, # skip interactive HTML preview; agents run non-interactively
)
UI.success("Submitted for App Review. The version releases #{options.fetch(:automatic_release, true) ? "automatically on approval" : "manually after approval"}.")
end
end