diff options
author | Allan Wang <me@allanwang.ca> | 2021-09-11 20:07:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-11 20:07:17 -0700 |
commit | 639771b9758f1e36c34ed99994ba2c03a0a361ec (patch) | |
tree | 38318946b3ad5210e2c649b36678321d9fbb26d4 /.github/workflows | |
parent | 64065549f22364b01095c59aad204ed252c9cd63 (diff) | |
download | kau-639771b9758f1e36c34ed99994ba2c03a0a361ec.tar.gz kau-639771b9758f1e36c34ed99994ba2c03a0a361ec.tar.bz2 kau-639771b9758f1e36c34ed99994ba2c03a0a361ec.zip |
Github Actions (#266)6.3.0
Diffstat (limited to '.github/workflows')
-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 |