Android CI #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android CI | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build release apk | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
with: | |
workflow_id: 14258028 | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@v2 | |
- name: set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build release apk | |
uses: eskatos/gradle-command-action@v1 | |
with: | |
arguments: assembleRelease | |
distributions-cache-enabled: true | |
dependencies-cache-enabled: true | |
configuration-cache-enabled: true | |
- name: Upload debug apk | |
uses: actions/upload-artifact@v2 | |
if: ${{ !github.head_ref }} | |
with: | |
name: apk-release | |
path: app/build/outputs/apk/release |