diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/android.yml | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 0000000..25a2499 --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,54 @@ +name: Android CI + +on: + push: + branches: [ '*' ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 100 + + - name: Fetch all tags + run: git fetch origin +refs/tags/*:refs/tags/* + + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + java-package: jdk + distribution: 'adopt' + cache: gradle + + - name: Validate gradle wrapper + uses: gradle/wrapper-validation-action@v1 + + - name: Decrypt secret + if: ${{ false }} + run: | + gpg -d --passphrase "${{ secrets.KAU_TAR_SECRET }}" --batch "files/kau_github.tar.gpg" > "files/kau_github.tar" + tar xvf files/kau_github.tar -C files + + - name: Checkout Gradle Build Cache + if: ${{ steps.self_hosted.outputs.FLAG != 'self-hosted' }} + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + !~/.gradle/wrapper/dists/**/gradle*.zip + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + gradle-${{ runner.os }}- + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Check and Test + run: ./gradlew spotlessCheck lintRelease testReleaseUnitTest |