generated from nimblehq/git-template
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.92 KB
/
deploy_production.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
name: Deploy production app to Firebase App Distribution
on:
push:
branches:
- main
- feature/6-set-up-cd-android
jobs:
deploy_android:
name: Deploy Android app to Firebase App Distribution
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
working-directory: ./sample
steps:
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: Checkout source code
uses: actions/[email protected]
- name: Cache Gradle
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/modules-*
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Decode singing properties
run: echo -n ${{ secrets.ANDROID_SIGNING_PROPERTIES }} | base64 --decode > signing.properties
- name: Restore release keystore
run: |
echo ${{ secrets.ANDROID_RELEASE_KEYSTORE }} > release.keystore.asc
gpg --quiet --batch --yes --decrypt --passphrase="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSPHRASE }}" --output config/release.keystore release.keystore.asc
- name: Decode buildKonfig properties
run: echo ${{ secrets.BUILD_KONFIG_PROPERTIES }} | base64 --decode > buildKonfig.properties
- name: Build staging APK
run: ./gradlew assembleProductionRelease
- name: Deploy staging to Firebase
uses: wzieba/[email protected]
with:
appId: ${{secrets.FIREBASE_APP_ID_STAGING}}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIAL_FILE_CONTENT }}
groups: testers
file: sample/android/build/outputs/apk/production/release/android-production-release.apk