Skip to content

Instantly share code, notes, and snippets.

@vitalbone
Created June 5, 2020 02:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vitalbone/bcce7d150388b1bc127c9449b05d8049 to your computer and use it in GitHub Desktop.
Save vitalbone/bcce7d150388b1bc127c9449b05d8049 to your computer and use it in GitHub Desktop.
name: PR & Deploy [UAT]
on:
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- uat
env:
APP_ENV: "staging"
ENABLE_TEST_API_LOGGING: true
BASE_API_URL: ${{ secrets.BASE_API_URL_STAGING }}
jobs:
ios:
name: Run iOS PR tasks
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.ref }}
fetch-depth: 1
- name: Setup Node
uses: actions/setup-node@v1
- name: Install node dependencies
working-directory: ./MyCoolApp
run: yarn
- name: Run jest tests
working-directory: ./MyCoolApp
run: npx jest --colors
- name: Set SSH private key in our build environment. This is for the repo that contains our iOS certificates
uses: webfactory/ssh-agent@v0.2.0
with:
ssh-private-key: ${{ secrets.SSH_MATCH_REPO_PRIVATE_KEY }}
- name: Set fastlane to CI mode
uses: maierj/fastlane-action@v1.4.0
with:
lane: "setupCI"
subdirectory: ./HonestyBox/ios
- name: Build and deploy to App Center [if PR merged]
uses: maierj/fastlane-action@v1.4.0
if: github.event.pull_request.merged
with:
lane: "build_and_deploy"
options: '{ "is_ci": true }'
subdirectory: ./HonestyBox/ios
env:
APPCENTER_IOS_APP_NAME: "My-Cool-App"
IOS_CERT_GIT_LOCATION: "git@github.com:my-cool-org/my-cool-app-certificates.git"
IOS_MATCH_APPLE_ID: "ci@example.com"
IOS_MATCH_RELEASE_TYPE: "development"
IOS_BUNDLE_ID: "au.com.myorg.MyCoolApp"
IOS_IPA_FILE: "./MyCoolApp.ipa"
IOS_DSYM_FILE: "./MyCoolApp.app.dSYM.zip"
APPCENTER_BETA_GROUP_NAME: "UAT"
MATCH_PASSWORD: ${{ secrets.MATCH_REPO_PASSWORD }}
KEYCHAIN_NAME: "temp_keychain"
KEYCHAIN_PASSWORD: "password"
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment