Skip to content

krrishnaaaa/android-ci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

android-ci

Reusable GitHub Actions workflow for building and testing Android projects.

Usage

Create .github/workflows/android.yml in your Android project:

name: Android CI
on:
  push:
    branches: [main, master]
  pull_request:
    branches: [main, master]
jobs:
  build:
    uses: krrishnaaaa/android-ci/.github/workflows/build.yml@main

That's it. This will:

  • Check out your code
  • Set up JDK 21
  • Cache Gradle dependencies
  • Build the debug APK
  • Run unit tests
  • Upload the APK as an artifact

Inputs

All inputs are optional with sensible defaults:

Input Default Description
java-version 21 JDK version
gradle-task assembleDebug Gradle build task
test-task test Gradle test task
run-tests true Whether to run unit tests
upload-artifact true Whether to upload built APK
artifact-path app/build/outputs/apk/debug/*.apk Path to artifact
artifact-name debug-apk Name for the uploaded artifact

Custom Example

name: Android CI
on:
  push:
    branches: [main]
jobs:
  build:
    uses: krrishnaaaa/android-ci/.github/workflows/build.yml@main
    with:
      java-version: '17'
      gradle-task: 'assembleRelease'
      run-tests: false
      artifact-path: 'app/build/outputs/apk/release/*.apk'
      artifact-name: 'release-apk'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors