-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.65 KB
/
android-cd.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
name: Android CD
on:
push:
tags:
- "v*.*.*"
defaults:
run:
working-directory: ./android
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 17
- name: Create Properties File
env:
DEBUG_KEYSTORE: ${{ secrets.DEBUG_KEYSTORE }}
KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }}
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: |
echo "$DEBUG_KEYSTORE" | base64 -d > debug.keystore
echo "$KEYSTORE_PROPERTIES" > keystore.properties
echo "$LOCAL_PROPERTIES" > local.properties
- name: Build Release APK
run: |
./gradlew :app:assembleRelease
- name: Upload Release Build to Artifacts
uses: actions/upload-artifact@v3
with:
name: release-artifacts
path: android/app/build/outputs/apk/release/
if-no-files-found: error
- name: Create Github Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
android/app/build/outputs/apk/release/app-release.apk
- name: Upload artifact to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_APP_ID}}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: testers
file: android/app/build/outputs/apk/release/app-release.apk