Skip to content

🚀 Build and Deploy App #2

🚀 Build and Deploy App

🚀 Build and Deploy App #2

Workflow file for this run

name: Build App
on:
workflow_dispatch:
inputs:
os:
type: choice
description: OS to build on
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
jobs:
build:
runs-on: ${{ github.event.inputs.os }}
strategy:
matrix:
node: [18.x]
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v2
- name: 🏗 Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
name: 🏗 Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: 🏗 Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: 👷 Build packages
run: "pnpm run build"
- name: 👷 Build app
working-directory: apps/expo
run: |
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: /apps/expo/app-build