-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (43 loc) · 1.35 KB
/
android.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: LCL Measurement Tool CI
env:
# The name of the main module repository
main_project_module: app
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew app:build
- name: Run Tests
run: ./gradlew app:testDemoDebugUnitTest
- name: Generate APK Debug Build with Gradle (Dev)
if: startsWith(github.ref, 'refs/tags/')
run: ./gradlew assembleDevDebug
- name: Generate APK Release Build with Gradle (Full)
if: startsWith(github.ref, 'refs/tags/')
run: ./gradlew assembleFullRelease
- name: Upload to Github Page
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
${{ env.main_project_module }}/build/outputs/apk/dev/debug/app-dev-debug.apk
${{ env.main_project_module }}/build/outputs/apk/full/debug/app-full-release.apk
draft: true
prerelease: true