Example Workflow for commits on the main branch of an iOS app. The Workflow contains:
- Installing Cocoapods and Carthage dependecies.
- Running all unit and UI tests in simulator
- Building a test app and uploading to bitrise.io
- Sending a Slack notification with the build status
---
format_version: '17'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: ios
meta:
bitrise.io:
stack: osx-xcode-16.0.x
machine_type_id: g2.mac.medium
workflows:
ci:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8: {}
- restore-cocoapods-cache@2: {}
- cocoapods-install@2: {}
- restore-carthage-cache@2: {}
- carthage@3:
inputs:
- carthage_options: "--use-xcframeworks --platform iOS"
- restore-spm-cache@2: {}
- xcode-test@5:
inputs:
- log_formatter: xcodebuild
- xcodebuild_options: "-enableCodeCoverage YES"
- xcode-archive@5:
inputs:
- project_path: $BITRISE_PROJECT_PATH
- scheme: $BITRISE_SCHEME
- automatic_code_signing: apple-id
- distribution_method: development
- save-spm-cache@1: {}
- save-carthage-cache@1: {}
- save-cocoapods-cache@1: {}
- deploy-to-bitrise-io@2: {}
- slack@4:
inputs:
- channel: "#build-notifications"
- webhook_url: $SLACK_WEBHOOK
app:
envs:
- BITRISE_PROJECT_PATH: BitriseTest.xcworkspace
opts:
is_expand: false
- BITRISE_SCHEME: BitriseTest
opts:
is_expand: false
- BITRISE_DISTRIBUTION_METHOD: development
opts:
is_expand: false
trigger_map:
- push_branch: main
workflow: ci