passforios/.github/workflows/deploying.yml
2020-12-30 15:18:39 -08:00

80 lines
2.7 KiB
YAML

name: CI
on:
push:
branches:
- master
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
channel: ['beta', 'release']
steps:
- uses: actions/checkout@v2
- name: Installing packages
run: |
brew install libtool automake cmake carthage go@1.14 swiftlint swiftformat
gem install bundler
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: actions/cache@v2
id: carthage-cache
with:
path: Carthage
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
restore-keys: |
${{ runner.os }}-carthage-
- uses: actions/cache@v2
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- uses: actions/cache@v2
id: gopenpgp-cache
with:
path: go
key: ${{ runner.os }}-gopenpgp-${{ hashFiles('**/gopenpgp_build.sh') }}
restore-keys: |
${{ runner.os }}-gopenpgp-
- name: Bundle Install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Cocoapods
run: bundle exec pod install
- name: Carthage
if: steps.carthage-cache.outputs.cache-hit != 'true'
run: ./scripts/wcarthage bootstrap --platform iOS --no-use-binaries --cache-builds
- name: GopenPGP
if: steps.gopenpgp-cache.outputs.cache-hit != 'true'
run: |
export PATH="/usr/local/opt/go@1.14/bin:$PATH"
./scripts/gopenpgp_build.sh
- name: Test
run: bundle exec fastlane test
- name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: bundle exec fastlane ${{ matrix.channel }}
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APP_IDENTIFIER: ${{ secrets.APP_IDENTIFIER }}
DESTINATION_EMAIL: ${{ secrets.DESTINATION_EMAIL }}
EMAIL_FROM_NAME: ${{ secrets.EMAIL_FROM_NAME }}
EMAIL_REPLY_TO: ${{ secrets.EMAIL_REPLY_TO }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
ITC_TEAM_ID: ${{ secrets.ITC_TEAM_ID }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MY_API_KEY: ${{ secrets.MY_API_KEY }}
MY_POSTMASTER: ${{ secrets.MY_POSTMASTER }}
TEAM_ID: ${{ secrets.TEAM_ID }}