Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- BITRISE_PROJECT_PATH: XXXX.xcworkspace
opts:
is_expand: false
- BITRISE_SCHEME: XXXXXX
opts:
is_expand: false
- opts:
is_expand: false
EXPANDED_PROVISIONING_PROFILE: ''
- opts:
is_expand: false
DEPLOYGATE_USERNAME: xxxxxx
- opts:
is_expand: false
DEV_PLIST_PATH: XXXX/Info.plist
- opts:
is_expand: false
APPSTORE_TEAM_ID: XXXXXXXX
- opts:
is_expand: false
APP_BUNDLE_IDENTIFIER: xxxxxxxxxxxxxxxxxxxxxxxxxxx
- opts:
is_expand: false
NOTIF_BUNDLE_IDENTIFIER: xxxxxxxxxxxxxxxxxxxxxxxxxxx
workflows:
develop:
steps:
- activate-ssh-key:
title: Activate App SSH key
inputs:
- ssh_key_save_path: "$HOME/.ssh/steplib_ssh_step_id_rsa"
- git-clone:
inputs:
- clone_depth: ''
- certificate-and-profile-installer: {}
- script:
inputs:
- content: |
#!/bin/bash
defaults write xcodebuild PBXNumberOfParallelBuildSubtasks 4
defaults write xcodebuild IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4
defaults write com.apple.xcode PBXNumberOfParallelBuildSubtasks 4
defaults write com.apple.xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4
title: xcodebuild configuration
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
set -x
# write your script here
git log --oneline | wc -l | tr -cd '0123456789' | envman add --key CUSTOM_BUILD_NUMBER
title: Get build version
- cache-pull: {}
- carthage:
inputs:
- carthage_options: "--platform ios --use-ssh --new-resolver"
- cocoapods-install: {}
- set-xcode-build-number:
inputs:
- plist_path: "$DEV_PLIST_PATH"
- build_version: "$CUSTOM_BUILD_NUMBER"
- fastlane:
inputs:
- lane: dev
- xcode-archive:
title: 'Xcode: Create Archive'
inputs:
- team_id: "$APPSTORE_TEAM_ID"
- configuration: Debug
- output_dir: "${BITRISE_DEPLOY_DIR}"
- force_team_id: "$APPSTORE_TEAM_ID"
- force_code_sign_identity: ''
- force_provisioning_profile_specifier: ''
- force_provisioning_profile: ''
- output_tool: xcodebuild
- is_export_xcarchive_zip: 'yes'
- xcodebuild_options: SWIFT_WHOLE_MODULE_OPTIMIZATION=YES
- export_method: development
- custom_export_options_plist_content: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE
plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist
version=\"1.0\">\n<dict>\n\t<key>compileBitcode</key>\n\t<false/>\n\t<key>method</key>\n\t<string>development</string>\n\t<key>provisioningProfiles</key>\n\t<dict>\n\t\t<key>$APP_BUNDLE_IDENTIFIER</key>\n\t\t<string>xxxxxxxx</string>\n\t\t<key>$NOTIF_BUNDLE_IDENTIFIER</key>\n\t\t<string>NotificationExtension</string>\n\t</dict>\n\t<key>signingCertificate</key>\n\t<string>iPhone
Developer</string>\n\t<key>signingStyle</key>\n\t<string>manual</string>\n\t<key>stripSwiftSymbols</key>\n\t<true/>\n\t<key>teamID</key>\n\t<string>$APPSTORE_TEAM_ID</string>\n\t<key>thinning</key>\n\t<string>&lt;none&gt;</string>\n</dict>\n</plist>"
- cache-push: {}
- deploy-to-bitrise-io: {}
- script:
title: Upload to deploygate
inputs:
- content: |-
path1=$(echo ${BITRISE_GIT_BRANCH} | tr '/' '\n' | sed -n 1P)
path2=$(echo ${BITRISE_GIT_BRANCH} | tr '/' '\n' | sed -n 2P)
if [ ${path1} == 'bugfix' ]; then
DISTRIBUTION='bugfix'
else
DISTRIBUTION=${path1}/${path2}
fi
RESULT=$(curl \
-F "token=$DEPLOYGATE_API_KEY" \
-F "file=@$BITRISE_IPA_PATH" \
-F "message=$BITRISE_GIT_BRANCH" \
-F "distribution_name=$DISTRIBUTION" \
-F "release_note=[Dev] #$CUSTOM_BUILD_NUMBER" \
https://deploygate.com/api/users/$DEPLOYGATE_USERNAME/apps)
URL=$(echo $RESULT | sed -E 's/^.*"distribution":.*"url":"(.*)".*$/\1/')
envman add --key DEPLOYGATE_URL --value $URL
- script:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
bundle install
UPLOAD_DSYMS_PATH=$BITRISE_SOURCE_DIR/script/dsyms_uploader.swift
if [ -e $UPLOAD_DSYMS_PATH ]; then
swift $UPLOAD_DSYMS_PATH "$BITRISE_DSYM_PATH" "$BITRISE_SOURCE_DIR/XXXX/GoogleService/dev/GoogleService-Info.plist"
fi
title: Upload dsyms to Firebase Crashlytics
- slack:
inputs:
- webhook_url: "$SLACK_WEBHOOK_URL"
- message: "$GIT_CLONE_COMMIT_MESSAGE_SUBJECT"
- pretext: "*$BITRISE_GIT_BRANCH ($CUSTOM_BUILD_NUMBER)*"
- title: ''
- fields: |
Branch|${BITRISE_GIT_BRANCH}
Install (DeployGate)|${DEPLOYGATE_URL}
Install (Bitrise)|${BITRISE_PUBLIC_INSTALL_PAGE_URL}
- footer: ''
- buttons: ''
- timestamp: 'no'
- author_name: ''
- message_on_error: |-
:sadparrot: *<Build Failed..* `$BITRISE_GIT_BRANCH`
:mag: <$BITRISE_BUILD_URL|Check build logs>
before_run:
after_run:
trigger_map:
- push_branch: *
workflow: develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.