diff --git a/Darwin/fastlane/Appfile b/Darwin/fastlane/Appfile index 7ca4d56..5c8d2ba 100644 --- a/Darwin/fastlane/Appfile +++ b/Darwin/fastlane/Appfile @@ -5,4 +5,6 @@ require('dotenv') Dotenv.load '../../Skip.env' app_identifier(ENV['ANDROID_APPLICATION_ID'] || ENV['PRODUCT_BUNDLE_IDENTIFIER']) -# apple_id("my@email") +apple_id ENV["APPLE_ID"] +itc_team_id ENV["ITC_TEAM_ID"] +team_id ENV["DEVELOPMENT_TEAM"] diff --git a/Darwin/fastlane/Fastfile b/Darwin/fastlane/Fastfile index cfc6f8f..6fc2306 100644 --- a/Darwin/fastlane/Fastfile +++ b/Darwin/fastlane/Fastfile @@ -20,35 +20,26 @@ lane :assemble do |options| ) end +# ─── Upload IPA to TestFlight (Bitrise's xcode-archive step already built it) ── 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", + ipa: ENV["BITRISE_IPA_PATH"], skip_waiting_for_build_processing: true ) end +# ─── Push metadata + upload IPA to App Store (Bitrise already built it) ─────── lane :release do |options| - desc "Build and release app" - - # see https://docs.fastlane.tools/uploading-app-privacy-details/ - #upload_app_privacy_details_to_app_store(json_path: "fastlane/app_privacy_details.json") - - # if you have an apikey.json file (https://developer.apple.com/documentation/appstoreconnectapi/creating-api-keys-for-app-store-connect-api), fastlane can automatically fetch certificates and the ASC authentication information - #get_certificates(api_key_path: "fastlane/apikey.json") - get_provisioning_profile(api_key_path: "fastlane/apikey.json") - - assemble - - upload_to_app_store( - api_key_path: "fastlane/apikey.json", + deliver( + ipa: ENV["BITRISE_IPA_PATH"], app_rating_config_path: "fastlane/metadata/rating.json", - release_notes: { default: "Fixes and improvements." } + release_notes: { default: "Fixes and improvements." }, + skip_screenshots: false, + skip_metadata: false, + force: true, + submit_for_review: false, + automatic_release: false, + run_precheck_before_submit: false ) end diff --git a/bitrise.yml b/bitrise.yml index 7481006..328fb67 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -9,16 +9,37 @@ meta: 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, written verbatim into apikey.json) + # ASC_KEY_CONTENT → .p8 file content base64-encoded + # ITC_TEAM_ID → iTunes Connect Team ID (numeric) # DEVELOPMENT_TEAM → Apple Developer Team ID, written into # Darwin/fastlane/AppStore.xcconfig at build time - # (Darwin/PediFoods.xcconfig leaves it blank on purpose) + # (Darwin/PediFoods.xcconfig leaves it blank on + # purpose — this project has no VERSIONING_SYSTEM / + # hardcoded team like LC Wallet, so it's injected + # here instead) + +# ─── PIPELINES ──────────────────────────────────────────────────────────────── +pipelines: + run_tests: + workflows: + build_for_testing: {} + test_without_building: + depends_on: + - build_for_testing + parallel: "$TEST_SHARD_COUNT" # ─── WORKFLOWS ──────────────────────────────────────────────────────────────── workflows: @@ -34,37 +55,57 @@ workflows: - content: | cd $BITRISE_SOURCE_DIR # CURRENT_PROJECT_VERSION lives in Skip.env — shared by both - # Darwin/PediFoods.xcconfig and Android/settings.gradle.kts, - # not a standard Xcode "Apple Generic Versioning" setting, - # so agvtool does not apply here. + # Darwin/PediFoods.xcconfig and Android/settings.gradle.kts. + # No VERSIONING_SYSTEM is set on the target, so agvtool + # (which LC Wallet uses) does not apply to this project. sed -i '' "s/CURRENT_PROJECT_VERSION = .*/CURRENT_PROJECT_VERSION = $BITRISE_BUILD_NUMBER/" Skip.env - script@1: - title: Write code signing team and App Store Connect API key + title: Write code signing team inputs: - content: | echo "DEVELOPMENT_TEAM = $DEVELOPMENT_TEAM" >> "$BITRISE_SOURCE_DIR/Darwin/fastlane/AppStore.xcconfig" - cat > "$BITRISE_SOURCE_DIR/Darwin/fastlane/apikey.json" <> "$BITRISE_SOURCE_DIR/Darwin/fastlane/AppStore.xcconfig" - cat > "$BITRISE_SOURCE_DIR/Darwin/fastlane/apikey.json" <