Build auth-enabled Codex quota APK #38
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: Build Codex Quota APK | |
| on: | |
| push: | |
| branches: | |
| - agent/codex-quota-auth-v1 | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: codex-quota-widget | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Set up Android SDK | |
| uses: android-actions/setup-android@v3 | |
| - name: Install Android SDK packages | |
| run: sdkmanager "platforms;android-35" "build-tools;35.0.0" | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| gradle-version: '8.9' | |
| - name: Restore stable debug signing key | |
| uses: actions/cache@v4 | |
| with: | |
| path: codex-quota-widget/.signing/debug.keystore | |
| key: codex-quota-debug-signing-v1 | |
| - name: Prepare stable debug signing key | |
| run: | | |
| mkdir -p .signing | |
| if [ ! -f .signing/debug.keystore ]; then | |
| keytool -genkeypair -noprompt \ | |
| -keystore .signing/debug.keystore \ | |
| -storepass codex-widget-local \ | |
| -keypass codex-widget-local \ | |
| -alias codexwidget \ | |
| -dname "CN=Codex Quota Widget, O=Mirochill, C=FR" \ | |
| -keyalg RSA -keysize 2048 -validity 10000 | |
| fi | |
| - name: Build installable debug APK | |
| run: gradle --no-daemon assembleDebug | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: codex-quota-widget-debug | |
| path: codex-quota-widget/app/build/outputs/apk/debug/app-debug.apk | |
| if-no-files-found: error |