Skip to content

Instantly share code, notes, and snippets.

@xxKRASHxx
Created September 27, 2019 20:22
Show Gist options
  • Save xxKRASHxx/e749d8061f4a25a117b0f26cb90dc404 to your computer and use it in GitHub Desktop.
Save xxKRASHxx/e749d8061f4a25a117b0f26cb90dc404 to your computer and use it in GitHub Desktop.
version: 2
jobs:
build:
macos:
xcode: "10.2.1"
shell: /bin/bash --login -eo pipefail
working_directory: /Users/distiller/project
environment:
FL_OUTPUT_DIR: output
BUNDLE_PATH: vendor/bundle
steps:
- checkout
- run:
name: Check Swift version
command: swift --version
- run:
name: Check Ruby version
command: which ruby
- restore_cache:
keys:
- v1-gems-{{ checksum "Gemfile.lock" }}
- run:
name: Bundler
command: bundle check || bundle install --path vendor/bundle
- save_cache:
key: v1-gems-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
# Download CocoaPods specs via HTTPS (faster than Git)
# and install CocoaPods.
- run:
name: Install CocoaPods
command: |
curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
- restore_cache:
keys:
- v1-pods-{{ checksum "Podfile.lock" }}
- run:
name: Build
command: bundle exec fastlane build build_number:${CIRCLE_BUILD_NUM}
no_output_timeout: 30m
- persist_to_workspace:
root: /Users/distiller/project
paths:
- build
- Pods
- vendor/bundle
- save_cache:
key: v1-pods-{{ checksum "Podfile.lock" }}
paths:
- ./Pods
distribute:
macos:
xcode: "10.2.1"
shell: /bin/bash --login -eo pipefail
working_directory: /Users/distiller/project
environment:
FL_OUTPUT_DIR: output
BUNDLE_PATH: vendor/bundle
steps:
- checkout
- attach_workspace:
at: /Users/distiller/project
- run:
name: Bundler
command: bundle check || bundle install --path vendor/bundle
- run:
name: Distribute
command: bundle exec fastlane distribute build_number:${CIRCLE_BUILD_NUM}
no_output_timeout: 30m
workflows:
version: 2
testflight:
jobs:
- build
- distribute:
requires:
- build
filters:
branches:
only:
- master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment