Build App #31
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 | |
options: | |
- macos-latest | |
- ubuntu-latest | |
platform: | |
type: choice | |
description: Platform to build for | |
options: | |
- android | |
- ios | |
profile: | |
type: choice | |
description: Build profile to use | |
options: | |
- development | |
- preview | |
- production | |
should_submit: | |
type: boolean | |
description: Whether to perform the submit step | |
required: true | |
default: true | |
jobs: | |
build: | |
runs-on: ${{ github.event.inputs.os }} | |
strategy: | |
matrix: | |
node: [22.x] | |
steps: | |
- name: π Setup repo | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: π Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: pnpm | |
- name: π Setup Java | |
if: ${{ github.event.inputs.platform == 'android' }} | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- 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: pnpm install | |
- name: π· Build app | |
run: | | |
eas build --local \ | |
--non-interactive \ | |
--output=./app-build \ | |
--platform=${{ github.event.inputs.platform }} \ | |
--profile=${{ github.event.inputs.profile }} | |
- name: π’ Submit | |
if: ${{ github.event.inputs.should_submit }} | |
run: eas submit -p ${{ github.event.inputs.platform }} --profile ${{ github.event.inputs.profile }} --path app-build |