Skip to content

Commit

Permalink
(misc) GitHub Actions for building development/staging builds
Browse files Browse the repository at this point in the history
  • Loading branch information
KingRainbow44 committed Mar 15, 2024
1 parent a560fbd commit 847c923
Show file tree
Hide file tree
Showing 5 changed files with 170 additions and 3 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build-android-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Android Development Build

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Setup Expo
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: bun clean && bun install

- name: Build Android app
run: eas build --profile development --platform android --local --output ${{ github.workspace }}/app-release.apk

- name: Upload APK artifact
uses: actions/upload-artifact@v2
with:
name: app-release
path: ${{ github.workspace }}/app-release.apk
46 changes: 46 additions & 0 deletions .github/workflows/build-android-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Android Staging Build

on:
push:
branches:
- dev
- v2
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Setup Expo
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: bun clean && bun install

- name: Build Android app
run: eas build --profile preview --platform android --local --output ${{ github.workspace }}/app-release.apk

- name: Upload APK artifact
uses: actions/upload-artifact@v2
with:
name: app-release
path: ${{ github.workspace }}/app-release.apk
33 changes: 33 additions & 0 deletions .github/workflows/build-ios-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: iOS Development Build

on:
workflow_dispatch:

jobs:
build:
runs-on: macos-latest
steps:
- name: Setup repo
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: Setup Expo
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: bun clean && bun install

- name: Build iOS app
run: eas build --profile development --platform ios --local --non-interactive --output ${{ github.workspace }}/app-release.ipa

- name: Upload IPA artifact
uses: actions/upload-artifact@v2
with:
name: app-release
path: ${{ github.workspace }}/app-release.ipa
40 changes: 40 additions & 0 deletions .github/workflows/build-ios-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: iOS Staging Build

on:
push:
branches:
- dev
- v2
workflow_dispatch:

jobs:
build:
runs-on: macos-latest
steps:
- name: Setup repo
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: Setup Expo
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: bun clean && bun install

- name: Build iOS app
run: eas build --profile preview --platform ios --local --non-interactive --output ${{ github.workspace }}/app-release.ipa

- name: Upload IPA artifact
uses: actions/upload-artifact@v2
with:
name: app-release
path: ${{ github.workspace }}/app-release.ipa

- name: Submit to TestFlight
uses: eas submit -p ios --path=${{ github.workspace }}/app-release.ipa
12 changes: 9 additions & 3 deletions eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
"preview": {
"distribution": "store"
"distribution": "store",
"autoIncrement": true
},
"production": {}
"production": {
"autoIncrement": true
}
},
"submit": {
"production": {}
Expand Down

0 comments on commit 847c923

Please sign in to comment.