-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (43 loc) · 1.55 KB
/
AndroidBuild.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
name: AndroidBuild
on:
push:
branches:
- 'build/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.1.0
- name: Set up JDK 11
uses: actions/setup-java@v3.13.0
with:
distribution: 'adopt'
java-version: '17'
- name: Grant execute permission for gradlew
run: |
chmod +x ./gradlew
- name: Setup secrets.properties
env:
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
SERVICE_KEY: ${{ secrets.SERVICE_KEY }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
POWERSYNC_URL: ${{ secrets.POWERSYNC_URL }}
TEST: "TEST_CI_VALUE"
run: |
sed -e "s|SAFE_DEFAULT_VALUE_SUPABASE_KEY|$(echo supabase_key)|g;" \
-e "s|SAFE_DEFAULT_VALUE_SERVICE_KEY|$(echo SERVICE_KEY)|g;" \
-e "s|SAFE_DEFAULT_VALUE_SUPABASE_URL|$(echo SUPABASE_URL)|g;" \
-e "s|SAFE_DEFAULT_VALUE_POWERSYNC_URL|$(echo POWERSYNC_URL)|g;" \
-e "s|TEST_DEFAULT_VALUE|$(echo TEST)|g;" secrets.defaults.properties > secrets.properties
- name: Build with Gradle
run: ./gradlew build
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.3
with:
name: periodpals.apk
path: app/build/outputs/apk/debug/app-debug.apk
- name: Decode Keystore
run: echo "${{ secrets.KEYSTORE }}" | base64 --decode > /tmp/keystore.jks
- name: Build Release
run: ./gradlew assembleDebug