Guide · Android · CI/CD

    How to build an APK from GitHub

    The fastest path from a GitHub repository to a signed .apk you can install on a device or upload to the Play Store — without installing Android Studio, writing a Gradle config, or wiring up a custom CI/CD pipeline.

    TL;DR

    • Push your mobile project (Capacitor, React Native, Flutter, or native Android) to GitHub.
    • Provide an Android keystore — or generate one in seconds.
    • Trigger a build on a managed GitHub Actions runner; download the signed APK when it's done.

    You can do this manually by writing your own workflow file, or skip the YAML entirely with Corenna.

    Why build APKs from GitHub at all?

    Building locally with Gradle or Android Studio works — until it doesn't. JDK mismatches, missing SDK components, keystore path errors, and "works on my machine" problems eat hours every release. Building from your GitHub repo on a clean, reproducible runner solves all of that:

    Save hours per release

    No local toolchain setup. One click, signed APK out.

    Reproducible builds

    Same JDK, same Gradle, same Android SDK every time.

    Tied to your commits

    Every artifact maps to a known commit SHA.

    Secure secret handling

    Keystore + passwords stored encrypted, never in the repo.

    Option 1 — Roll your own GitHub Actions workflow

    If you want full control (and don't mind maintaining YAML, secrets, and Gradle plumbing), GitHub Actions can build an APK for you. Add a workflow file at .github/workflows/build-android.yml:

    name: Build Android APK
    on:
      workflow_dispatch:
      push:
        branches: [main]
    
    jobs:
      build:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-java@v4
            with: { distribution: temurin, java-version: '17' }
          - uses: actions/setup-node@v4
            with: { node-version: '20', cache: npm }
          - run: npm ci
          - run: npx cap sync android   # Capacitor projects only
          - name: Decode keystore
            run: echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > android/app/release.keystore
          - name: Build signed APK
            working-directory: android
            env:
              ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
              ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
              ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
            run: ./gradlew :app:assembleRelease --no-daemon
          - uses: actions/upload-artifact@v4
            with:
              name: app-release-apk
              path: android/app/build/outputs/apk/release/*.apk

    What you still have to do yourself

    • Generate a keystore with keytool and base64-encode it.
    • Add 4 secrets in your repo settings: ANDROID_KEYSTORE_BASE64, ANDROID_KEYSTORE_PASSWORD, ANDROID_KEY_ALIAS, ANDROID_KEY_PASSWORD.
    • Configure android/app/build.gradle with a release signingConfig that reads those env vars.
    • Keep the workflow, Gradle, JDK, and SDK versions current.

    That's a working pipeline — and a recurring maintenance tax.

    Option 2 — Skip the YAML with Corenna

    Corenna is a managed build service that turns the entire flow above into three clicks. You connect your GitHub repository, hand over (or generate) a keystore once, and trigger signed builds whenever you want.

    1. Connect GitHub. Install the Corenna GitHub App and pick the repository you want to build from. Your source code never leaves GitHub — builds run inside your repo's Actions runners.
    2. Add signing credentials. Upload an existing Android keystore, or generate a brand new one in-app. Keystore blobs and passwords are encrypted at rest with authenticated encryption and pushed to GitHub via libsodium sealed-box encryption.
    3. Trigger a build. Pick APK or AAB, set the version and build number, and start. Logs stream live; when it finishes, you download a signed artifact tied to a specific commit SHA.

    First signed APK in under 10 minutes.

    No Gradle config, no Android Studio, no custom workflow YAML.

    Manual GitHub Actions vs Corenna

    TaskDIY GitHub ActionsCorenna
    Workflow YAMLWrite & maintain yourselfAuto-generated
    Keystore generationkeytool + base64 + manual uploadOne click in UI
    Secret management4 GitHub secrets, manual rotationEncrypted, pushed via sealed-box
    Gradle release configEdit build.gradle yourselfTemplated
    VersioningManual or scriptAuto-incremented
    Build logsGitHub Actions UILive streamed + redacted
    AAB for Play StoreAdd a second jobToggle a switch

    Frequently asked questions

    Can I build an APK from any GitHub repository?

    Yes, as long as the repo contains a buildable Android project — native Android, Capacitor, React Native, Flutter, or anything else that produces an Android module.

    Do I need Android Studio installed?

    No. The entire toolchain (JDK, Android SDK, Gradle) runs on the GitHub Actions runner. Your laptop only needs a browser.

    Is the APK signed?

    Yes. Once you provide a keystore, every build is signed with your release key and ready for sideloading or Play Store upload.

    What about iOS / .ipa files?

    Corenna also builds signed .ipa files using your Apple certificates and provisioning profiles — same flow, same UI.

    Where is my source code stored?

    Nowhere outside GitHub. Builds run inside the runners attached to your repo; Corenna never clones your code to its own servers.

    Get on with it

    Build your first APK from GitHub today

    Skip the YAML, the Gradle errors, and the keystore juggling. Connect a repo and ship a signed APK in minutes.