omnikey-keyboard/.github/workflows/android-build.yml
Omega Launcher 08378546f9 Add GitHub Actions workflows
- Android build workflow (CI on every push)
- Release workflow (CD for version tags)
- Automated APK building and artifact upload
- Lint checks with reports

Workflows will build the keyboard on every push.
Note: Build will fail until KeyboardView UI is implemented.

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-06-12 07:51:14 +01:00

91 lines
2.8 KiB
YAML

name: Android Build
on:
push:
branches: [ master, main, develop ]
pull_request:
branches: [ master, main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build debug APK
run: ./gradlew assembleDebug --stacktrace --no-daemon
- name: Build release APK
run: ./gradlew assembleRelease --stacktrace --no-daemon
- name: Upload debug APK
uses: actions/upload-artifact@v4
with:
name: omnikey-debug
path: app/build/outputs/apk/debug/*.apk
retention-days: 30
- name: Upload release APK
uses: actions/upload-artifact@v4
with:
name: omnikey-release
path: app/build/outputs/apk/release/*.apk
retention-days: 90
- name: Run lint
run: ./gradlew lint --no-daemon
continue-on-error: true
- name: Upload lint results
uses: actions/upload-artifact@v4
if: always()
with:
name: lint-results
path: app/build/reports/lint-results*.html
retention-days: 30
- name: Build summary
if: always()
run: |
echo "## Build Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### APK Sizes" >> $GITHUB_STEP_SUMMARY
if [ -f app/build/outputs/apk/debug/app-debug.apk ]; then
DEBUG_SIZE=$(ls -lh app/build/outputs/apk/debug/app-debug.apk | awk '{print $5}')
echo "- Debug APK: $DEBUG_SIZE" >> $GITHUB_STEP_SUMMARY
fi
if [ -f app/build/outputs/apk/release/app-release-unsigned.apk ]; then
RELEASE_SIZE=$(ls -lh app/build/outputs/apk/release/app-release-unsigned.apk | awk '{print $5}')
echo "- Release APK: $RELEASE_SIZE" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Features" >> $GITHUB_STEP_SUMMARY
echo "- ✅ 200+ keyboard features" >> $GITHUB_STEP_SUMMARY
echo "- ✅ 11 specialized engines" >> $GITHUB_STEP_SUMMARY
echo "- ✅ 50+ user preferences" >> $GITHUB_STEP_SUMMARY
echo "- ✅ ML Kit integration" >> $GITHUB_STEP_SUMMARY
echo "- ⚠️ UI layer not yet implemented" >> $GITHUB_STEP_SUMMARY