Skip to content

Instantly share code, notes, and snippets.

@mekwall
Created November 10, 2020 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mekwall/8a025f45d506f9c6ef7924113ab9e644 to your computer and use it in GitHub Desktop.
Save mekwall/8a025f45d506f9c6ef7924113ab9e644 to your computer and use it in GitHub Desktop.
GitHub Action: Build and upload IPA to TestFlight
name: Build and upload IPA to TestFlight
on:
push:
tags:
- testflight
env:
EXPO_APPLE_ID: ${{ secrets.EXPO_APPLE_ID }}
EXPO_APPLE_PASSWORD: ${{ secrets.EXPO_APPLE_PASSWORD }}
jobs:
publish:
name: Build and upload
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: 14.x
- uses: actions/setup-ruby@v1
with:
ruby-version: "2.6"
- uses: expo/expo-github-action@v5
with:
expo-packager: yarn
expo-token: ${{ secrets.EXPO_TOKEN }}
expo-cache: true
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: yarn install
- name: Install fastlane
run: brew install fastlane
- name: Build IPA
run: expo build:ios --non-interactive --no-publish --type archive
- name: Download IPA
run: curl "$(expo url:ipa --non-interactive)" -o app.ipa
- uses: actions/upload-artifact@v2
with:
name: app.ipa
path: ./app.ipa
- name: Upload IPA to TestFlight
run: fastlane pilot upload --app_identifier <APP_IDENTIFIER> --team_id <TEAM_ID> --api_key_path <PATH_TO_APPLE_CONNECT_API_KEY.JSON>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment