Merge pull request 'Add Bitrise pipeline for TestFlight and App Store deploys' (#9) from feature/ci/bitrise-setup into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#9
This commit is contained in:
@@ -19,6 +19,19 @@ lane :assemble do |options|
|
||||
)
|
||||
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|
|
||||
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