build mobile app #11
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 mobile app | |
on: | |
pull_request: | |
types: [opened, ready_for_review] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
build-android: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Cache Node Modules | |
uses: actions/cache@v4 | |
with: | |
path: "**/node_modules" | |
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }} | |
- name: Install dependencies | |
run: bun install | |
- name: Build dependencies | |
run: bun run build | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Build Android app | |
run: cd apps/expo && bun apk | |
- name: Upload movie-web.apk as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: apk | |
path: ./apps/expo/android/app/build/movie-web.apk | |
build-ios: | |
runs-on: macos-14 | |
if: github.repository_owner != 'JorrinKievit' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Cache Node Modules | |
uses: actions/cache@v4 | |
with: | |
path: "**/node_modules" | |
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }} | |
- name: Install dependencies | |
run: bun install | |
- name: Build dependencies | |
run: bun run build | |
- name: Cache Pods | |
uses: actions/cache@v4 | |
with: | |
path: apps/expo/ios | |
key: ${{ runner.os }}-pods-${{ hashFiles('**/bun.lockb') }} | |
- name: Build iOS app | |
run: cd apps/expo && bun ipa | |
- name: Upload movie-web.ipa as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ipa | |
path: ./apps/expo/ios/build/movie-web.ipa |