feat(ios): add fastlane setup
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -15,3 +15,10 @@ Core/
|
|||||||
apps/ios/*.xcodeproj/
|
apps/ios/*.xcodeproj/
|
||||||
apps/ios/*.xcworkspace/
|
apps/ios/*.xcworkspace/
|
||||||
apps/ios/.swiftpm/
|
apps/ios/.swiftpm/
|
||||||
|
|
||||||
|
# fastlane (iOS)
|
||||||
|
apps/ios/fastlane/report.xml
|
||||||
|
apps/ios/fastlane/Preview.html
|
||||||
|
apps/ios/fastlane/screenshots/
|
||||||
|
apps/ios/fastlane/test_output/
|
||||||
|
apps/ios/fastlane/logs/
|
||||||
|
|||||||
@@ -16,3 +16,13 @@ open Clawdis.xcodeproj
|
|||||||
|
|
||||||
## Shared packages
|
## Shared packages
|
||||||
- `../shared/ClawdisKit` — shared types/constants used by iOS (and later macOS bridge + gateway routing).
|
- `../shared/ClawdisKit` — shared types/constants used by iOS (and later macOS bridge + gateway routing).
|
||||||
|
|
||||||
|
## fastlane
|
||||||
|
```bash
|
||||||
|
brew install fastlane
|
||||||
|
|
||||||
|
cd apps/ios
|
||||||
|
fastlane lanes
|
||||||
|
```
|
||||||
|
|
||||||
|
See `apps/ios/fastlane/README.md` for App Store Connect auth + upload lanes.
|
||||||
|
|||||||
13
apps/ios/fastlane/.env.example
Normal file
13
apps/ios/fastlane/.env.example
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# App Store Connect API key (pick one approach)
|
||||||
|
#
|
||||||
|
# Recommended:
|
||||||
|
# APP_STORE_CONNECT_API_KEY_PATH=/absolute/path/to/AuthKey_XXXXXX.json
|
||||||
|
#
|
||||||
|
# Or:
|
||||||
|
# ASC_KEY_ID=XXXXXXXXXX
|
||||||
|
# ASC_ISSUER_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
||||||
|
# ASC_KEY_CONTENT=BASE64_P8_CONTENT
|
||||||
|
|
||||||
|
# Deliver toggles (off by default)
|
||||||
|
# DELIVER_METADATA=1
|
||||||
|
# DELIVER_SCREENSHOTS=1
|
||||||
7
apps/ios/fastlane/Appfile
Normal file
7
apps/ios/fastlane/Appfile
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
app_identifier("com.steipete.clawdis.ios")
|
||||||
|
|
||||||
|
# Auth is expected via App Store Connect API key.
|
||||||
|
# Provide either:
|
||||||
|
# - APP_STORE_CONNECT_API_KEY_PATH=/path/to/AuthKey_XXXXXX.p8.json (recommended)
|
||||||
|
# or:
|
||||||
|
# - ASC_KEY_ID, ASC_ISSUER_ID, and ASC_KEY_CONTENT (base64 or raw p8 content)
|
||||||
54
apps/ios/fastlane/Fastfile
Normal file
54
apps/ios/fastlane/Fastfile
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
default_platform(:ios)
|
||||||
|
|
||||||
|
platform :ios do
|
||||||
|
private_lane :asc_api_key do
|
||||||
|
key_path = ENV["APP_STORE_CONNECT_API_KEY_PATH"]
|
||||||
|
if key_path && !key_path.strip.empty?
|
||||||
|
return app_store_connect_api_key(path: key_path)
|
||||||
|
end
|
||||||
|
|
||||||
|
key_id = ENV["ASC_KEY_ID"]
|
||||||
|
issuer_id = ENV["ASC_ISSUER_ID"]
|
||||||
|
key_content = ENV["ASC_KEY_CONTENT"]
|
||||||
|
|
||||||
|
UI.user_error!("Missing App Store Connect API key. Set APP_STORE_CONNECT_API_KEY_PATH or ASC_KEY_ID/ASC_ISSUER_ID/ASC_KEY_CONTENT.") if [key_id, issuer_id, key_content].any? { |v| v.nil? || v.strip.empty? }
|
||||||
|
|
||||||
|
is_base64 = key_content.include?("BEGIN PRIVATE KEY") ? false : true
|
||||||
|
|
||||||
|
app_store_connect_api_key(
|
||||||
|
key_id: key_id,
|
||||||
|
issuer_id: issuer_id,
|
||||||
|
key_content: key_content,
|
||||||
|
is_key_content_base64: is_base64
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
desc "Build + upload to TestFlight"
|
||||||
|
lane :beta do
|
||||||
|
api_key = asc_api_key
|
||||||
|
|
||||||
|
build_app(
|
||||||
|
project: "Clawdis.xcodeproj",
|
||||||
|
scheme: "Clawdis",
|
||||||
|
export_method: "app-store",
|
||||||
|
clean: true
|
||||||
|
)
|
||||||
|
|
||||||
|
upload_to_testflight(
|
||||||
|
api_key: api_key,
|
||||||
|
skip_waiting_for_build_processing: true
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
desc "Upload App Store metadata (and optionally screenshots)"
|
||||||
|
lane :metadata do
|
||||||
|
api_key = asc_api_key
|
||||||
|
|
||||||
|
deliver(
|
||||||
|
api_key: api_key,
|
||||||
|
force: true,
|
||||||
|
skip_screenshots: ENV["DELIVER_SCREENSHOTS"] != "1",
|
||||||
|
skip_metadata: ENV["DELIVER_METADATA"] != "1"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
23
apps/ios/fastlane/README.md
Normal file
23
apps/ios/fastlane/README.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# fastlane (Clawdis iOS)
|
||||||
|
|
||||||
|
Install fastlane (recommended via Homebrew):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew install fastlane
|
||||||
|
```
|
||||||
|
|
||||||
|
Configure App Store Connect auth:
|
||||||
|
|
||||||
|
- Recommended: set `APP_STORE_CONNECT_API_KEY_PATH` to a JSON key file path.
|
||||||
|
- Alternative: set `ASC_KEY_ID`, `ASC_ISSUER_ID`, `ASC_KEY_CONTENT` (base64 p8).
|
||||||
|
|
||||||
|
Common lanes:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd apps/ios
|
||||||
|
fastlane beta
|
||||||
|
|
||||||
|
# Upload metadata/screenshots only when explicitly enabled:
|
||||||
|
DELIVER_METADATA=1 fastlane metadata
|
||||||
|
DELIVER_METADATA=1 DELIVER_SCREENSHOTS=1 fastlane metadata
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user