Skip to content

Instantly share code, notes, and snippets.

@mumer92
Forked from aterribili/.travis.yml
Created March 5, 2020 10:11
Show Gist options
  • Save mumer92/93b3801c20b29c8f17cc9838146d8f3f to your computer and use it in GitHub Desktop.
Save mumer92/93b3801c20b29c8f17cc9838146d8f3f to your computer and use it in GitHub Desktop.
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