Skip to content

Instantly share code, notes, and snippets.

@foloinfo
Created September 27, 2023 01:42
Show Gist options
  • Save foloinfo/b7477ada00425cbfd94e6a683122bfeb to your computer and use it in GitHub Desktop.
Save foloinfo/b7477ada00425cbfd94e6a683122bfeb to your computer and use it in GitHub Desktop.
eas build on github actions example (.github/workflows/eas-build.yml)
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
@foloinfo
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment