Skip to content

Instantly share code, notes, and snippets.

@meetjanani-simformsolutions
Created June 29, 2021 04:33
Show Gist options
  • Save meetjanani-simformsolutions/9270801b1eb17083bb014a7b378701db to your computer and use it in GitHub Desktop.
Save meetjanani-simformsolutions/9270801b1eb17083bb014a7b378701db to your computer and use it in GitHub Desktop.
Bitrise Single workflow with multiple environment [ Development & Production ]
---
format_version: '8'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: flutter
workflows:
production:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@4: {}
- script@1:
title: Do anything with Script step
- certificate-and-profile-installer@1: {}
- flutter-installer@0:
inputs:
- version: 2.0.5
- is_update: 'false'
- flutter@0:
inputs:
- version: 2.0.5
- commands: packages get | packages pub run build_runner build
- flutter-analyze@0:
inputs:
- project_location: "$BITRISE_FLUTTER_PROJECT_LOCATION"
- set-xcode-build-number@1:
inputs:
- build_version_offset: '1'
- build_short_version_string: 1.0.0
- plist_path: "$BITRISE_SOURCE_DIR/ios/Runner/Info.plist"
- flutter-build@0:
inputs:
- project_location: "."
- is_debug_mode: 'true'
- android_additional_params: "--release -t lib/main_prod.dart -v"
- ios_additional_params: "--release -t lib/main_prod.dart -v"
- xcode-archive@3:
inputs:
- export_method: app-store
is_always_run: true
- deploy-to-itunesconnect-application-loader@0.11:
inputs:
- itunescon_user: "$APPLE_ID"
- password: "$APPLE_ID_PASSWORD"
- app_password: "$APP_SPECIFIC_PASSWORD"
- connection: apple_id
is_always_run: true
- appcenter-deploy-android@2:
inputs:
- owner_name: Simform-Android
- app_name: MoverMatch-Android
- app_path: "/Users/vagrant/deploy/app-release.apk"
- distribution_group: BitriseRelease
- mandatory: 'yes'
- debug: 'yes'
- release_notes: Production Release Note
- api_token: "$appCenterKey"
is_always_run: true
- deploy-to-bitrise-io@1: {}
- set-xcode-build-number@1:
inputs:
- build_version_offset: '1'
- build_short_version_string: 1.0.0
- plist_path: "$BITRISE_SOURCE_DIR/ios/Runner/Info.plist"
is_always_run: true
- flutter-build@0:
inputs:
- project_location: "."
- is_debug_mode: 'true'
- android_additional_params: "--release -t lib/main_dev.dart -v"
- ios_additional_params: "--release -t lib/main_dev.dart -v"
is_always_run: true
- xcode-archive@3:
inputs:
- export_method: app-store
is_always_run: true
- deploy-to-itunesconnect-application-loader@0.11:
inputs:
- itunescon_user: "$APPLE_ID"
- password: "$APPLE_ID_PASSWORD"
- app_password: "$APP_SPECIFIC_PASSWORD"
- connection: apple_id
is_always_run: true
- appcenter-deploy-android@2:
inputs:
- owner_name: Simform-Android
- app_name: MoverMatch-Android
- app_path: "/Users/vagrant/deploy/app-release.apk"
- distribution_group: BitriseRelease
- mandatory: 'yes'
- debug: 'yes'
- release_notes: Production Release Note
- api_token: "$appCenterKey"
is_always_run: true
- deploy-to-bitrise-io@1: {}
- cache-push@2: {}
app:
envs:
- opts:
is_expand: false
BITRISE_FLUTTER_PROJECT_LOCATION: "."
- opts:
is_expand: false
BITRISE_PROJECT_PATH: ios/Runner.xcworkspace
- opts:
is_expand: false
BITRISE_SCHEME: Runner
- opts:
is_expand: false
BITRISE_EXPORT_METHOD: development
- opts:
is_expand: false
appCenterKey: 1af2db3f464afef498fad0044b5d00dfaa2d9599
trigger_map:
- pull_request_source_branch: develop
pull_request_target_branch: master
workflow: production
- pull_request_target_branch: develop
workflow: deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment