Skip to content

Build Android App

Build Android App #4

Workflow file for this run

name: Build Android App
on:
workflow_dispatch:
inputs:
profile:
type: choice
required: true
default: production
description: Build profile to use
options:
- development
- preview
- production
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Get pnpm store directory
id: pnpm-cache
run: echo "store=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.store }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Update Google Services JSON
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
GOOGLE_SERVICES_JSON_DEBUG: ${{ secrets.GOOGLE_SERVICES_JSON_DEBUG }}
run: |
echo $GOOGLE_SERVICES_JSON | base64 -di > ./google-services.json
echo $GOOGLE_SERVICES_JSON_DEBUG | base64 -di > ./google-services.debug.json
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Build Android App
run: |
eas build \
--local \
--non-interactive \
--platform=android \
--profile=${{ github.event.inputs.profile }}
- name: Upload Android Build Artifact
uses: actions/upload-artifact@v4
with:
name: android-${{ github.event.inputs.profile }}-${{ github.run_number }}
path: |
./*.apk
./*.aab
if-no-files-found: error