CI Pipelines

Automating Builds with a Generic CI Pipeline

A Capacitor 243,123 build is four commands, so any CI service with Node.js 2,131 , Java 21 and the Android SDK can build the APK on every push. BookNest's GitHub Actions 29 workflow keeps the APK as an artifact:

.github/workflows/android.ymlYAML
name: Android build
on: [push, pull_request]
jobs:
  android:
    runs-on: ubuntu-latest # the image includes the Android SDK
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-node@v7
        with:
          node-version: 22
          cache: npm
      - uses: actions/setup-java@v6
        with:
          distribution: temurin
          java-version: 21
          cache: gradle
      - run: npm ci
      - run: npm run build
      - run: npx cap sync android
      - run: ./gradlew assembleDebug --no-daemon
        working-directory: android
      - uses: actions/upload-artifact@v7
        with:
          name: booknest-debug-apk
          path: android/app/build/outputs/apk/debug/app-debug.apk

The actions are at their latest majors of 25 September 2026. The workflow itself cannot run here, but its steps can: on a fresh git clone with a warm Gradle 19,597 cache, npm 2,036 ci added 741 packages in 16 seconds and ./gradlew assembleDebug ended in BUILD SUCCESSFUL in 1m 28s. To ship web-only changes from main as well, add a step with if: github.ref == 'refs/heads/main' that runs npx @capawesome/cli login --token "$CAPAWESOME_TOKEN" and the apps:liveupdates:upload command of Channels and Rollouts.

Commit package-lock.json, so npm ci installs what you tested, and the android/ folder (Committing android/ and ios/), which the pipeline syncs into rather than generates. Keep the Capawesome 178,914 token and the release keystore (Release Signing) in the CI secret store, never in the repository. GitLab CI 377 or Jenkins 8,793 run the same steps.