Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
iOS + Travis + Fastlane continuous delivery
language: objective-c
os: osx
xcode_workspace: {workspace-name}.xcworkspace
xcode_scheme: {workspace-name}
xcode_sdk: iphonesimulator9.0
osx_image: xcode8
before_install:
- |
brew update
gem install xcpretty -N --no-ri --no-doc
gem update fastlane
install: pod install
script:
- |
set -o pipefail
xcodebuild clean test -workspace {workspace-name}.xcworkspace -scheme talk7 -destination "platform=iOS Simulator,name=iPhone 6 Plus" | xcpretty
after_success:
- ./scripts/travis/testflight.sh

Deploy an app automatically to testflight after success build in Travis on branch master.

1 - Add .travis.yml to your project

2 - Configure travis.yml file changing the {workspace-name} to your workspace name

3 - Add Fastlane to your project

4 - Add Fastlane Match to your project

5 - Create scripts/travis directory and add testflight.sh to it

6 - Install Travis client to encrypt your Fastlane credentials

7 - Execute travis encrypt "FASTLANE_PASSWORD={apple password}" --add

8 - Execute travis encrypt "MATCH_PASSWORD={match password}" --add

9 - That's all. When you merge PR on master, the release will start.

#!/bin/sh
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
echo "This is a pull request. No deployment will be done."
exit 0
fi
if [[ "$TRAVIS_BRANCH" != "master" ]]; then
echo "Testing on a branch other than master. No deployment will be done."
exit 0
fi
fastlane matchappstore
fastlane beta
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.