-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (71 loc) · 2.27 KB
/
Copy pathandroid.yaml
File metadata and controls
85 lines (71 loc) · 2.27 KB
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
83
84
85
name: Android Continuous Integration
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Cache Gradle dependencies
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Create Google Services JSON File
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: |
echo "$GOOGLE_SERVICES_JSON" | base64 -d > ./app/google-services.json
- name: Create Local Properties File
env:
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: |
echo "$LOCAL_PROPERTIES" | base64 -d > local.properties
- name: Create Key Store File
env:
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
RELEASE_KEYSTORE_PASSPHRASE: ${{ secrets.RELEASE_KEYSTORE_PASSPHRASE }}
run: |
echo "$RELEASE_KEYSTORE" > testKeyStore.jks.asc
gpg -d --passphrase "$RELEASE_KEYSTORE_PASSPHRASE" --batch testKeyStore.jks.asc > app/testKeyStore.jks
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build --warning-mode fail
- name: Save logcat output
uses: actions/upload-artifact@master
if: failure()
with:
name: logcat
path: artifacts/logcat.log
codeql-trigger:
name: CodeQL analysis
runs-on: ubuntu-latest
needs: build
if: always()
steps:
- name: Trigger CodeQL analysis
run: echo "Trigger CodeQL analysis"