Add Android release APK workflow

This commit is contained in:
Daniel 2026-05-17 19:11:37 +02:00
parent 4dac08fffe
commit 344d21bd4a
2 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,38 @@
name: Android Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
release-apk:
runs-on: android-ci
env:
GRADLE_VERSION: 8.10.2
steps:
- name: Check out repository
run: |
git clone "http://forgejo:3000/${GITHUB_REPOSITORY}.git" .
git checkout "$GITHUB_SHA"
- name: Install tools
run: |
apt-get update
apt-get install -y --no-install-recommends ca-certificates curl nodejs unzip
curl -fsSL "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" -o /tmp/gradle.zip
unzip -q /tmp/gradle.zip -d /opt
ln -s "/opt/gradle-${GRADLE_VERSION}/bin/gradle" /usr/local/bin/gradle
- name: Build installable APK
run: |
gradle --no-daemon :app:assembleDebug
mkdir -p dist
cp app/build/outputs/apk/debug/app-debug.apk "dist/calorie-ai-${GITHUB_REF_NAME}.apk"
- name: Upload APK artifact
uses: actions/upload-artifact@v3
with:
name: calorie-ai-apk
path: dist/*.apk

View file

@ -21,6 +21,8 @@ gradle :app:assembleDebug
Forgejo Actions builds the debug APK on every push to `main` and uploads it as the `calorie-ai-debug-apk` artifact.
Tagged versions also build an installable APK named `calorie-ai-vX.Y.Z.apk` through the Android Release workflow.
## AI Endpoint
The app expects an OpenAI-compatible endpoint at: