Created
November 10, 2020 11:51
-
-
Save mekwall/8a025f45d506f9c6ef7924113ab9e644 to your computer and use it in GitHub Desktop.
GitHub Action: Build and upload IPA to TestFlight
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: 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