mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build apk
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Cancel previous runs
|
|
uses: styfle/cancel-workflow-action@0.5.0
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
|
|
- name: Clone repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK 11
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 11
|
|
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
|
|
- name: Build APK
|
|
uses: eskatos/gradle-command-action@v1
|
|
with:
|
|
arguments: :app:build
|
|
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-debug
|
|
path: app/build/outputs/apk/debug
|
|
|
|
- name: Upload release APK
|
|
uses: actions/upload-artifact@v2
|
|
if: ${{ !github.head_ref }}
|
|
with:
|
|
name: apk-release
|
|
path: app/build/outputs/apk/release
|