Skip to content

Instantly share code, notes, and snippets.

@sergeylaptev
Created June 2, 2019 13:44
Show Gist options
  • Save sergeylaptev/f5ded096c4d28b0ec59a21d3e9613a08 to your computer and use it in GitHub Desktop.
Save sergeylaptev/f5ded096c4d28b0ec59a21d3e9613a08 to your computer and use it in GitHub Desktop.
Bitrise iOS config
---
format_version: '3'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: ios
workflows:
_init_install:
steps:
- [email protected]:
title: Activate App SSH key
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- [email protected]: {}
- [email protected]:
inputs:
- command: install
_xcode_archive:
steps:
- certificate-and-profile-installer: {}
- [email protected]:
inputs:
- bundle_version_short: ''
- bundle_version: "$BITRISE_BUILD_NUMBER"
- info_plist_file: "$BITRISE_INFO_PLIST_PATH"
- file-downloader:
inputs:
- destination: "$ENVFILE_DESTINATION"
- source: "$ENVFILE_URL"
- xcode-archive:
inputs:
- team_id: ''
- configuration: ''
- force_team_id: ''
- force_provisioning_profile_specifier: ''
- force_provisioning_profile: ''
- is_clean_build: 'yes'
- output_tool: xcodebuild
- is_export_xcarchive_zip: 'yes'
- export_method: app-store
- custom_export_options_plist_content: ''
- [email protected]:
inputs:
- itunescon_user: "$APPSTORE_CONNECT_USER"
- password: "$APPSTORE_CONNECT_PASSWORD"
- app_id: "$APPSTORE_CONNECT_APP_ID"
- bundle_id: "$APPSTORE_CONNECT_BUNDLE_ID"
- deploy-to-bitrise-io:
run_if: false
is_always_run: false
inputs:
- notify_user_groups: none
envs:
- opts:
is_expand: true
BITRISE_PROJECT_PATH: ios/Synchronic.xcodeproj
- BITRISE_INFO_PLIST_PATH: ios/Synchronic/Info.plist
_slack_message:
steps:
- slack:
inputs:
- webhook_url: "$SLACK_WEBHOOK_URL"
- channel: "#bitrise"
- from_username: iOS $ENVIRONMENT Build Succeeded
- from_username_on_error: iOS $ENVIRONMENT Build Failed
- emoji: ":confetti_ball:"
- emoji_on_error: ":shrug:"
development:
steps:
- script:
title: Set Environment
inputs:
- content: |-
#!/bin/bash
envman add --key ENVFILE --value .env.dev
envman add --key ENVFILE_DESTINATION --value ".env.dev"
envman add --key ENVFILE_URL --value "$BITRISEIO_ENVFILE_DEV_URL"
envman add --key BITRISE_SCHEME --value "Development"
envman add --key ENVIRONMENT --value "[STG] Synchronic"
envman add --key APPSTORE_CONNECT_APP_ID --value "$APPSTORE_CONNECT_APP_ID_DEV"
envman add --key APPSTORE_CONNECT_BUNDLE_ID --value "$APPSTORE_CONNECT_BUNDLE_ID_DEV"
before_run:
- _init_install
after_run:
- _xcode_archive
- _slack_message
production:
steps:
- script:
title: Set Environment
inputs:
- content: |-
#!/bin/bash
envman add --key ENVFILE --value .env
envman add --key ENVFILE_DESTINATION --value ".env"
envman add --key ENVFILE_URL --value "$BITRISEIO_ENVFILE_URL"
envman add --key BITRISE_SCHEME --value "Production"
envman add --key ENVIRONMENT --value "[PRD] Synchronic"
envman add --key APPSTORE_CONNECT_APP_ID --value "$APPSTORE_CONNECT_APP_PRD_ID"
envman add --key APPSTORE_CONNECT_BUNDLE_ID --value "$APPSTORE_CONNECT_BUNDLE_ID_PRD"
before_run:
- _init_install
after_run:
- _xcode_archive
- _slack_message
trigger_map:
- push_branch: production
workflow: production
- push_branch: master
workflow: development
- push_branch: bitrise
workflow: development
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment