Created
September 27, 2023 01:42
-
-
Save foloinfo/b7477ada00425cbfd94e6a683122bfeb to your computer and use it in GitHub Desktop.
eas build on github actions example (.github/workflows/eas-build.yml)
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 App | |
on: | |
workflow_dispatch: | |
inputs: | |
os: | |
type: choice | |
description: OS to build on. Ubuntu is faster, MacOS supports iOS builds, Windows is unsupported | |
options: | |
- macos-12 | |
- ubuntu-latest | |
platform: | |
type: choice | |
description: Platform to build for | |
options: | |
- ios | |
- android | |
profile: | |
type: choice | |
description: Build profile to use | |
options: | |
- staging | |
- production | |
jobs: | |
build: | |
runs-on: ${{ github.event.inputs.os }} | |
steps: | |
- name: π Setup Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
if: runner.os == 'macOS' | |
with: | |
xcode-version: '13.4.1' | |
- name: π Setup repo | |
uses: actions/checkout@v3 | |
- name: π Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.17.1' | |
cache: yarn | |
- name: π Setup Expo and EAS | |
uses: expo/expo-github-action@v7 | |
with: | |
token: ${{ secrets.EXPO_TOKEN }} | |
expo-version: latest | |
eas-version: latest | |
- name: π¦ Install dependencies | |
run: yarn | |
- name: π Setup Pod cache | |
uses: actions/cache@v3 | |
with: | |
path: Pods | |
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pods- | |
- name: π· Build app | |
run: | | |
APP_ENV=${{ github.event.inputs.profile }} eas build --local \ | |
--non-interactive \ | |
--output=./app-build \ | |
--platform=${{ github.event.inputs.platform }} \ | |
--profile=${{ github.event.inputs.profile }} | |
- name: π± Upload binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: app-${{ github.event.inputs.platform }} | |
path: app-build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For circleCI https://gist.github.com/foloinfo/58df77ecb1d46332d384188c63130338