feat: GHA for iOS release flow (#23196)

This commit is contained in:
Alex
2025-10-23 14:57:19 -05:00
committed by GitHub
parent 9b58d5663a
commit 47436ad0ce
3 changed files with 156 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
source "https://rubygems.org"
gem "fastlane"
gem "cocoapods"

View File

@@ -16,6 +16,55 @@
default_platform(:ios)
platform :ios do
desc "iOS Release to TestFlight"
lane :release_ci do
# Setup CI environment
setup_ci
# Import certificate and provisioning profile
import_certificate(
certificate_path: "certificate.p12",
certificate_password: ENV["IOS_CERTIFICATE_PASSWORD"],
keychain_name: ENV["KEYCHAIN_NAME"],
keychain_password: ENV["KEYCHAIN_PASSWORD"]
)
# Install provisioning profile
install_provisioning_profile(path: "profile.mobileprovision")
# Configure code signing
update_code_signing_settings(
use_automatic_signing: false,
path: "./Runner.xcodeproj",
team_id: ENV["FASTLANE_TEAM_ID"],
profile_name: "app.alextran.immich AppStore"
)
# Increment build number
increment_build_number(
build_number: latest_testflight_build_number + 1,
xcodeproj: "./Runner.xcodeproj"
)
# Build the app
build_app(
scheme: "Runner",
workspace: "Runner.xcworkspace",
export_method: "app-store",
export_options: {
provisioningProfiles: {
"app.alextran.immich" => "app.alextran.immich AppStore"
}
}
)
# Upload to TestFlight
upload_to_testflight(
api_key_path: "api_key.json",
skip_waiting_for_build_processing: true
)
end
desc "iOS Release"
lane :release do
enable_automatic_code_signing(