[ci-bitrise] Add Bitrise pipeline for TestFlight and App Store deploys
Modeled on LC Wallet's bitrise.yml. Push-only trigger map (develop->beta, main->release), no PR-triggered checks. Reuses the existing Skip fastlane lanes directly instead of a generic xcode-archive step, since build_app already carries the Skip-specific xcconfig and build flags. Adds a beta lane (TestFlight) to match release, which was the only lane wired before.
This commit is contained in:
@@ -19,6 +19,19 @@ lane :assemble do |options|
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
lane :beta do |options|
|
||||||
|
desc "Build and upload to TestFlight"
|
||||||
|
|
||||||
|
get_provisioning_profile(api_key_path: "fastlane/apikey.json")
|
||||||
|
|
||||||
|
assemble
|
||||||
|
|
||||||
|
upload_to_testflight(
|
||||||
|
api_key_path: "fastlane/apikey.json",
|
||||||
|
skip_waiting_for_build_processing: true
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
lane :release do |options|
|
lane :release do |options|
|
||||||
desc "Build and release app"
|
desc "Build and release app"
|
||||||
|
|
||||||
|
|||||||
98
bitrise.yml
Normal file
98
bitrise.yml
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
format_version: '26'
|
||||||
|
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
|
||||||
|
project_type: ios
|
||||||
|
|
||||||
|
meta:
|
||||||
|
bitrise.io:
|
||||||
|
stack: osx-xcode-26.0.x
|
||||||
|
machine_type_id: g2-m1.8core
|
||||||
|
|
||||||
|
app:
|
||||||
|
envs:
|
||||||
|
- BITRISE_PROJECT_PATH: Darwin/PediFoods.xcodeproj
|
||||||
|
opts:
|
||||||
|
is_expand: false
|
||||||
|
- BITRISE_SCHEME: PediFoods App
|
||||||
|
opts:
|
||||||
|
is_expand: false
|
||||||
|
- BITRISE_DISTRIBUTION_METHOD: app-store
|
||||||
|
opts:
|
||||||
|
is_expand: false
|
||||||
|
- APPLE_ID: developer@loverde.com.br
|
||||||
|
# MANUAL (Bitrise Secrets tab — never commit these):
|
||||||
|
# ASC_KEY_ID → App Store Connect API Key ID
|
||||||
|
# ASC_ISSUER_ID → App Store Connect Issuer ID
|
||||||
|
# ASC_KEY_CONTENT → .p8 file content (raw, not base64 — written verbatim into apikey.json)
|
||||||
|
# ITC_TEAM_ID → iTunes Connect Team ID (numeric)
|
||||||
|
|
||||||
|
# ─── WORKFLOWS ────────────────────────────────────────────────────────────────
|
||||||
|
workflows:
|
||||||
|
|
||||||
|
# ── Beta → TestFlight ──────────────────────────────────────────────────────
|
||||||
|
beta:
|
||||||
|
description: Build, sign, and upload to TestFlight
|
||||||
|
steps:
|
||||||
|
- git-clone@8: {}
|
||||||
|
- script@1:
|
||||||
|
title: Set build number
|
||||||
|
inputs:
|
||||||
|
- content: |
|
||||||
|
cd $BITRISE_SOURCE_DIR
|
||||||
|
agvtool new-version -all $BITRISE_BUILD_NUMBER
|
||||||
|
- script@1:
|
||||||
|
title: Write App Store Connect API key
|
||||||
|
inputs:
|
||||||
|
- content: |
|
||||||
|
cat > "$BITRISE_SOURCE_DIR/Darwin/fastlane/apikey.json" <<EOF
|
||||||
|
{"key_id":"$ASC_KEY_ID","issuer_id":"$ASC_ISSUER_ID","key":"$ASC_KEY_CONTENT","in_house":false}
|
||||||
|
EOF
|
||||||
|
- fastlane@3:
|
||||||
|
inputs:
|
||||||
|
- lane: beta
|
||||||
|
- work_dir: $BITRISE_SOURCE_DIR/Darwin
|
||||||
|
|
||||||
|
# ── Full release → App Store ───────────────────────────────────────────────
|
||||||
|
release:
|
||||||
|
description: Build, sign, and upload to App Store
|
||||||
|
envs:
|
||||||
|
- ASC_KEY_ID: $ASC_KEY_ID
|
||||||
|
- ASC_ISSUER_ID: $ASC_ISSUER_ID
|
||||||
|
- ASC_KEY_CONTENT: $ASC_KEY_CONTENT
|
||||||
|
steps:
|
||||||
|
- git-clone@8: {}
|
||||||
|
- script@1:
|
||||||
|
title: Verify ASC secrets
|
||||||
|
inputs:
|
||||||
|
- content: |
|
||||||
|
if [ -z "$ASC_KEY_ID" ]; then
|
||||||
|
echo "ERROR: ASC_KEY_ID is empty"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "ASC_KEY_ID is set (length: ${#ASC_KEY_ID})"
|
||||||
|
echo "ASC_ISSUER_ID is set (length: ${#ASC_ISSUER_ID})"
|
||||||
|
echo "ASC_KEY_CONTENT is set (length: ${#ASC_KEY_CONTENT})"
|
||||||
|
- script@1:
|
||||||
|
title: Set build number
|
||||||
|
inputs:
|
||||||
|
- content: |
|
||||||
|
cd $BITRISE_SOURCE_DIR
|
||||||
|
agvtool new-version -all $BITRISE_BUILD_NUMBER
|
||||||
|
- script@1:
|
||||||
|
title: Write App Store Connect API key
|
||||||
|
inputs:
|
||||||
|
- content: |
|
||||||
|
cat > "$BITRISE_SOURCE_DIR/Darwin/fastlane/apikey.json" <<EOF
|
||||||
|
{"key_id":"$ASC_KEY_ID","issuer_id":"$ASC_ISSUER_ID","key":"$ASC_KEY_CONTENT","in_house":false}
|
||||||
|
EOF
|
||||||
|
- fastlane@3:
|
||||||
|
inputs:
|
||||||
|
- lane: release
|
||||||
|
- work_dir: $BITRISE_SOURCE_DIR/Darwin
|
||||||
|
- deploy-to-bitrise-io@2: {}
|
||||||
|
|
||||||
|
# ─── TRIGGER MAP ──────────────────────────────────────────────────────────────
|
||||||
|
trigger_map:
|
||||||
|
- push_branch: develop
|
||||||
|
workflow: beta
|
||||||
|
- push_branch: main
|
||||||
|
workflow: release
|
||||||
Reference in New Issue
Block a user