🎉 feat(.gitea/workflows/buildapk.yaml): add new GitHub Actions workflow for building APK
Some checks failed
Building APK / build-apk (push) Has been cancelled

This workflow triggers on every push, sets up Java, Android SDK, bun, and EAS, installs dependencies, builds the APK, zips all APK files, and uploads the zipped APK as an artifact.
This commit is contained in:
Djalim Simaila 2024-04-05 13:08:52 +02:00
parent b11eb932d6
commit 2272e75096
7 changed files with 69 additions and 4 deletions

View File

@ -0,0 +1,55 @@
name: Building APK
run-name: Build APK
on: [push]
jobs:
build-apk:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
packages: ''
cmdline-tools-version: 9862592
- name: Setup bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- run: ./gradlew clean
working-directory: ./android
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
packager: bun
- name: Build APK
run: eas build --no-wait --profile production --platform android --non-interactive --local
- name: Zip all apk
run: |
zip apk.zip *.apk
- name: Upload APK ZIP
uses: actions/upload-artifact@v2
with:
name: apk
path: apk.zip

View File

@ -78,6 +78,13 @@ def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInRelea
def jscFlavor = 'org.webkit:android-jsc:+'
android {
externalNativeBuild {
cmake {
path file('CMakeLists.txt')
version '3.18.1'
}
}
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

View File

@ -8,7 +8,7 @@ buildscript {
targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '34')
kotlinVersion = findProperty('android.kotlinVersion') ?: '1.8.10'
ndkVersion = "25.1.8937393"
ndkVersion = "26.2.11394342"
}
repositories {
google()

View File

@ -10,7 +10,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
org.gradle.jvmargs=-Xmx8192m -XX:MaxMetaspaceSize=1024m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit

BIN
bun.lockb

Binary file not shown.

View File

@ -11,7 +11,10 @@
}
},
"preview": {
"distribution": "internal"
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
"production": {
"android": {

View File

@ -30,7 +30,7 @@
"react-native-gesture-handler": "~2.14.0",
"react-native-pager-view": "6.2.3",
"react-native-paper": "^5.12.3",
"react-native-reanimated": "~3.6.2",
"react-native-reanimated": "latest",
"react-native-safe-area-context": "4.8.2",
"react-native-safe-area-view": "^1.1.1",
"react-native-screens": "~3.29.0",