Created
September 7, 2021 12:19
-
-
Save rudrankriyam/f38fd0fbc18f2487656cb8e5bc364227 to your computer and use it in GitHub Desktop.
Codemagic yaml file example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workflows: | |
ios-workflow: | |
name: iOS Workflow | |
environment: | |
vars: | |
XCODE_PROJECT: "CICDExample.xcodeproj" | |
XCODE_SCHEME: "CICDExample" | |
BUNDLE_ID: "com.rudrankriyam.cicdexample" | |
APP_STORE_CONNECT_ISSUER_ID: Encrypted(...) | |
APP_STORE_CONNECT_KEY_IDENTIFIER: Encrypted(...) | |
APP_STORE_CONNECT_PRIVATE_KEY: Encrypted(...) | |
CERTIFICATE_PRIVATE_KEY: Encrypted(...) | |
xcode: edge | |
cocoapods: default | |
triggering: | |
events: | |
- push | |
- tag | |
- pull_request | |
branch_patterns: | |
- pattern: 'main' | |
include: true | |
source: true | |
scripts: | |
- name: Testing the project | |
script: | | |
xcode-project run-tests --project "$XCODE_PROJECT" --scheme "$XCODE_SCHEME" | |
- name: Setting up keychain | |
script: | | |
keychain initialize | |
- name: Fetching signing files | |
script: | | |
app-store-connect fetch-signing-files $BUNDLE_ID --type IOS_APP_STORE --create | |
- name: Using system default keychain | |
script: | | |
keychain add-certificates | |
- name: Setting up code signing settings on Xcode project | |
script: | | |
xcode-project use-profiles --project "$XCODE_PROJECT" | |
- name: Incrementing build number | |
script: | | |
#!/bin/sh | |
set -e | |
set -x | |
cd $FCI_BUILD_DIR | |
agvtool new-version -all $(($BUILD_NUMBER + 1)) | |
- name: Building ipa for distribution | |
script: | | |
xcode-project build-ipa --project "$XCODE_PROJECT" --scheme "$XCODE_SCHEME" | |
artifacts: | |
- build/ios/ipa/*.ipa | |
- $HOME/Library/Developer/Xcode/DerivedData/**/Build/**/*.dSYM | |
publishing: | |
app_store_connect: | |
api_key: $APP_STORE_CONNECT_PRIVATE_KEY | |
key_id: $APP_STORE_CONNECT_KEY_IDENTIFIER | |
issuer_id: $APP_STORE_CONNECT_ISSUER_ID | |
submit_to_testflight: true | |
email: | |
recipients: | |
- rudrankriyam@gmail.com | |
notify: | |
success: true | |
failure: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment