frosty/ios/fastlane/Fastfile
Tommy Chow 7f4abdefea ci: add release dry-run workflow and release-mode compile checks
Add a weekly + manual release-dryrun workflow that exercises the full store
pipeline without publishing: Android validates the AAB against Google Play
(validate_only), iOS builds a fully signed archive via match (readonly) and
skips the App Store upload. Both Fastlane lanes gain a dry_run option that
reuses the real release path so the dry-run stays faithful to it.

Also add release-mode compile checks (flutter build apk/ios --release) to CI
and PR checks to catch release-only breakage, pinning the JDK to match the
release toolchain. Trim ci.yml from a redundant 3-OS matrix to two
purpose-built jobs (analyze/test once on Linux, iOS build on macOS).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 23:15:38 -07:00

66 lines
2.3 KiB
Ruby

# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:ios)
platform :ios do
desc 'Push a new release build to the App Store'
lane :release do |options|
dry_run = options[:dry_run] || false
# Setup for CI. Uses a keychain to prevent the CI from hanging due to password prompts.
setup_ci
# Obtain credentials from App Store Connect API. Will be automatically used for the rest of the lane.
app_store_connect_api_key(
key_id: ENV['APP_STORE_KEY_ID'],
issuer_id: ENV['APP_STORE_ISSUER_ID'],
key_content: ENV['APP_STORE_CREDENTIALS'],
is_key_content_base64: true
)
# Manage code signing (with match). readonly on a dry run so we only verify the
# existing cert/profile resolve and never regenerate or mutate the certificates repo.
sync_code_signing(readonly: dry_run)
# Automatic signing is used during development, but fastlane needs to use manual signing.
update_code_signing_settings(
code_sign_identity: 'iPhone Distribution',
profile_name: 'match AppStore com.tommychow.frosty'
)
# Build the app for release.
build_app(
workspace: 'Runner.xcworkspace',
scheme: 'Runner',
output_directory: '../build/ios/archive'
)
# On a dry run, stop here: the signed archive above exercises every step that
# actually fails (ASC key, match certs/profiles, signing, release build). The
# App Store upload itself is the only remaining unverified step.
next if dry_run
# Upload the app to the App Store.
upload_to_app_store(
submit_for_review: true,
force: true, # Disable HTML summary prompt that appears when uploading to the App Store.
precheck_include_in_app_purchases: false, # Disabled due to not being supported with the App Store Connect API Key.
skip_screenshots: true,
automatic_release: true,
submission_information: { add_id_info_uses_idfa: false }
)
end
end