Repository navigation
fix(windows): preserve npm updates and explicit Node selection #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Android APK | ||
|
Check failure on line 1 in .github/workflows/android-apk.yml
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "apps/android-shell/**" | ||
| - ".github/workflows/android-apk.yml" | ||
| push: | ||
| paths: | ||
| - "apps/android-shell/**" | ||
| - ".github/workflows/android-apk.yml" | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| debug-apk: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 25 | ||
| defaults: | ||
| run: | ||
| working-directory: apps/android-shell | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: temurin | ||
| java-version: "17" | ||
| - uses: android-actions/setup-android@v3 | ||
| with: | ||
| packages: "platform-tools" | ||
| - run: sdkmanager "platforms;android-35" "build-tools;35.0.0" | ||
| - uses: gradle/actions/setup-gradle@v4 | ||
| - run: ./gradlew testDebugUnitTest assembleDebug | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: codexhost-android-debug | ||
| path: apps/android-shell/app/build/outputs/apk/debug/app-debug.apk | ||
| if-no-files-found: error | ||
| - name: Build signed release APK | ||
| if: ${{ secrets.ANDROID_KEYSTORE_BASE64 != '' }} | ||
| env: | ||
| ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | ||
| ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | ||
| ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | ||
| ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | ||
| run: | | ||
| set -euo pipefail | ||
| KEYSTORE_FILE="${RUNNER_TEMP}/codexhost-release.jks" | ||
| trap 'rm -f "$KEYSTORE_FILE"' EXIT | ||
| printf '%s' "$ANDROID_KEYSTORE_BASE64" | base64 --decode > "$KEYSTORE_FILE" | ||
| ANDROID_KEYSTORE_FILE="$KEYSTORE_FILE" ./gradlew assembleRelease | ||
| - name: Upload signed release APK | ||
| if: ${{ secrets.ANDROID_KEYSTORE_BASE64 != '' }} | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: codexhost-android-release | ||
| path: apps/android-shell/app/build/outputs/apk/release/app-release.apk | ||
| if-no-files-found: error | ||