upd: ci #2
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
name: iOS CI | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: macOS-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.6 | |
bundler-cache: true | |
- name: Cache Fastlane | |
uses: actions/cache@v2 | |
with: | |
path: ~/.gem | |
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gem- | |
- name: Install dependencies | |
run: | | |
gem install bundler | |
bundle install --without=documentation | |
- name: Build and Test | |
run: | | |
xcodebuild -workspace YourWorkspace.xcworkspace -scheme YourScheme -sdk iphoneos -configuration AppStoreDistribution archive -archivePath $PWD/build/YourApp.xcarchive | |
- name: Export .ipa | |
run: | | |
xcodebuild -exportArchive -archivePath $PWD/build/YourApp.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath $PWD/build | |
- name: Install Fastlane | |
run: bundle exec fastlane init | |
- name: Upload to TestFlight | |
run: bundle exec fastlane pilot upload |