-
Notifications
You must be signed in to change notification settings - Fork 20
65 lines (52 loc) · 1.72 KB
/
publish_firebase.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
name: Publish - Firebase
on:
workflow_call:
workflow_dispatch:
inputs:
groups:
description: 'Distribution Groups (default: all)'
required: false
buildtype:
type: choice
description: Build Types
options:
- Debug
- Release
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
publish-firebase:
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 60
env:
BUILD_NUMBER: ${{ github.run_number }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 19
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 19
- name: Set up environment
run: |
echo "${{ secrets.FIREBASE_DISTRIBUTION_SERVICE_ACCOUNT_BASE64 }}" | base64 -d > ./firebase_distribution_service_account.json;
echo "${{ secrets.SIGNING_PROPERTIES_FILE_BASE64 }}" | base64 -d > ./credentials.properties;
echo "${{ secrets.SIGNING_KEYSTORE_FILE_BASE64 }}" | base64 -d > ./android_keystore.jks;
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Deploy Firebase
run: |
if [[ '${{ inputs.buildtype }}' == 'Release' ]]; then
./gradlew --no-configuration-cache assembleRelease appDistributionUploadRelease
else
./gradlew --no-configuration-cache assembleDebug appDistributionUploadDebug
fi
env:
KEYS_PATH: 'Key Path'
FIREBASE_DISTRIBUTION_GROUPS: ${{ github.event.inputs.groups }}