From 08378546f9f14f634926753a191b5c4647a7ab50 Mon Sep 17 00:00:00 2001 From: Omega Launcher Date: Fri, 12 Jun 2026 07:51:14 +0100 Subject: [PATCH] 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) --- .claude/settings.local.json | 7 +- .github/workflows/android-build.yml | 91 ++++++++++++++++++++++ .github/workflows/release.yml | 116 ++++++++++++++++++++++++++++ 3 files changed, 213 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/android-build.yml create mode 100644 .github/workflows/release.yml diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 9b72803..309622c 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -4,7 +4,12 @@ "Bash(git init *)", "Bash(git add *)", "Bash(git commit *)", - "Bash(chmod +x gradlew)" + "Bash(chmod +x gradlew)", + "Bash(gh repo *)", + "Bash(git rm *)", + "Bash(git push *)", + "Bash(git remote *)", + "Bash(git restore *)" ] } } diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml new file mode 100644 index 0000000..9048270 --- /dev/null +++ b/.github/workflows/android-build.yml @@ -0,0 +1,91 @@ +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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..061fdc2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,116 @@ +name: Release Build + +on: + push: + tags: + - 'v*.*.*' + workflow_dispatch: + inputs: + version: + description: 'Version number (e.g., 1.0.0)' + required: true + type: string + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + + 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: Build release APK + run: ./gradlew assembleRelease --no-daemon + + - name: Sign APK + if: env.KEYSTORE_FILE != '' + env: + KEYSTORE_FILE: ${{ secrets.KEYSTORE_FILE }} + KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + KEY_ALIAS: ${{ secrets.KEY_ALIAS }} + KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} + run: | + echo "Signing would happen here with keystore" + # Actual signing requires keystore setup + + - name: Get version + id: version + run: | + if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then + echo "VERSION=${{ inputs.version }}" >> $GITHUB_OUTPUT + else + echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT + fi + + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + name: OmniKey v${{ steps.version.outputs.VERSION }} + tag_name: v${{ steps.version.outputs.VERSION }} + draft: false + prerelease: true + generate_release_notes: true + body: | + ## OmniKey v${{ steps.version.outputs.VERSION }} + + ### ⚠️ Pre-Release Notice + This is a **backend-only release**. The keyboard service and all engines are functional, but the UI layer (KeyboardView, Settings screens) is not yet implemented. + + ### What's Included + - ✅ Complete InputMethodService implementation + - ✅ 11 specialized engines (Prediction, Swipe, Code, Writer, etc.) + - ✅ 50+ user preferences with DataStore + - ✅ 9 Room database entities + - ✅ ML Kit integration + - ✅ 10 built-in themes + - ✅ Full gesture system + + ### What's Missing + - ❌ KeyboardView rendering + - ❌ Settings UI screens + - ❌ Theme editor + - ❌ Emoji picker + + ### For Developers + This release is perfect for: + - Learning Android keyboard architecture + - Contributing UI implementation + - Forking for custom keyboards + - Studying production Kotlin code + + See `IMPLEMENTATION_STATUS.md` for details. + + ### Installation + 1. Download `omnikey-release.apk` + 2. Install on Android device + 3. Enable in Settings → System → Languages & Input + 4. Currently shows blank keyboard (UI not implemented) + + ### Next Release + - [ ] KeyboardView implementation + - [ ] Basic settings UI + - [ ] Theme selector + - [ ] Clipboard UI + files: | + app/build/outputs/apk/release/*.apk + README.md + FEATURES.md + IMPLEMENTATION_STATUS.md + + - name: Upload to Play Store (Future) + if: false + run: | + echo "Play Store upload would happen here" + # Requires Play Store API setup