-
Notifications
You must be signed in to change notification settings - Fork 42
69 lines (62 loc) · 1.94 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
name: main
on:
workflow_dispatch:
push:
branches: [ main ]
paths-ignore:
- '**.md'
- '**.txt'
- '.github/**'
- '.idea/**'
- '!.github/workflows/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.3.0
with:
submodules: 'recursive'
fetch-depth: 0
- name: set up JDK 17
uses: actions/setup-java@v3.9.0
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Cache Gradle Dependencies
uses: actions/cache@v3.2.4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/caches/build-cache-*
key: gradle-deps-core-${{ hashFiles('**/build.gradle.kts', '**/build.gradle', '**/libs.versions.toml') }}
restore-keys: |
gradle-deps
- name: Cache Gradle Build
uses: actions/cache@v3.2.4
with:
path: |
~/.gradle/caches/build-cache-*
~/.gradle/buildOutputCleanup/cache.properties
key: gradle-builds-core-${{ github.sha }}
restore-keys: |
gradle-builds
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: |
echo ${{ secrets.SIGN_KEYSTORE_BASE64 }} | base64 -d > keystore.jks
./gradlew :app:assembleRelease
env:
KEYSTORE_PATH: "../keystore.jks"
KEYSTORE_PASSWORD: ${{ secrets.SIGN_KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.SIGN_KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASSWORD }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
# don't upload the artifacts if it's a pull request
if: ${{ !github.event.pull_request }}
with:
path: './app/build/outputs/*'
name: build_output_${{ github.event.head_commit.id }}.zip