DEV Community

Arif Ikhsanudin
Arif Ikhsanudin

Posted on

How to use Github Actions to build Android App

Build your android app when push into github actions!

Add workflow file

Add workflow file under directory .github/workflows/. File name can be anything, but the extension must yaml.

Example: .github/workflows/android.yml

name: Android CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8

      - name: Make gradlew executable
        run: chmod +x ./gradlew

      - name: Build with Gradle
        run: ./gradlew build

Done

Commit this file and push it to the GitHub!

Click Actions tab to see the result

Alt Text

Thanks for reading!

Top comments (0)