-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (79 loc) · 2.14 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Android Build
on:
push:
branches:
- master
paths:
- ".github/workflows/android.yml"
- "**.js"
- "**.json"
- "**.ts"
- "**.tsx"
- "template/.eslint*"
- "template/.prettier*"
- "template/package.json"
- "template/tsconfig.json"
- "template/yarn.lock"
- "template/android/**"
pull_request:
branches:
- master
paths:
- ".github/workflows/android.yml"
- "**.js"
- "**.json"
- "**.ts"
- "**.tsx"
- "template/package.json"
- "template/yarn.lock"
- "template/android/**"
types:
- opened
- reopened
- synchronize
concurrency:
group: android-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Android Build
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
working-directory: template
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: "template/.nvmrc"
cache: "yarn"
cache-dependency-path: template/yarn.lock
- name: Setup JDK 11
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"
- name: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Cache Gradle Dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Install dependencies
run: yarn
- name: Android Release Build
run: cd android && ./gradlew assembleRelease --no-daemon
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: helloworld-app-release.apk
path: template/android/app/build/outputs/apk/release/app-release.apk