-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (61 loc) · 1.85 KB
/
ci.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
name: CI
on:
push:
branches-ignore:
- master
jobs:
fixups:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check if there are fixup commits
run: git log --pretty=format:%s origin/master.. | xargs | grep -v fixup
version:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check version bump
run: git diff --diff-filter=M origin/master -- "MuzeiWebcam/build.gradle" | grep "def version"
ci:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Setup Android SDK
run: |
mkdir -p $HOME/android-sdk-linux/licenses
echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" >> $HOME/android-sdk-linux/licenses/android-sdk-license
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Get google-services.json
run: echo ${{ secrets.GOOGLE_SERVICES_JSON }} | base64 -d > MuzeiWebcam/google-services.json
- name: Lint
run: |
./gradlew lintD
- name: Build
run: |
./gradlew assembleDebug
- name: Upload APK as artifact
uses: actions/upload-artifact@v2
with:
name: APK
path: MuzeiWebcam/build/outputs/apk/debug/MuzeiWebcam-debug.apk