-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (51 loc) · 1.87 KB
/
firebase_internal_testing.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
name: Distribute builds for internal testing through Firebase
on:
push:
# Run for QA builds.
tags:
- '[0-9]+.[0-9]+.[0-9]+-qa.[0-9]+'
workflow_dispatch:
env:
java_version: "17"
jobs:
build:
runs-on: ubuntu-latest
environment:
name: Internal testing
url: https://console.firebase.google.com/project/concordiummobilewallet/appdistribution/
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Firebase credentials file
run: 'echo "$CREDENTIALS" > app/app-distribution-credentials.json'
shell: bash
env:
CREDENTIALS: ${{secrets.GOOGLE_APPLICATION_CREDENTIALS}}
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: "${{env.java_version}}"
distribution: corretto
- name: Check if build version matches the tag
run: |
buildVersion="$(./gradlew -q printVersionName)"
tagVersion="${GITHUB_REF#refs/tags/}"
if [ "$buildVersion" != "$tagVersion" ]; then
echo "Build version '$buildVersion' doesn't match the tag '$tagVersion'"
exit 1
fi
shell: bash
env:
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
- name: Build and distribute Testnet APK
run: ./gradlew app:assembleTstnetRelease app:appDistributionUploadTstnetRelease --stacktrace
- name: Build and distribute Stagenet APK
run: ./gradlew app:assembleStagenetRelease app:appDistributionUploadStagenetRelease --stacktrace
- name: Build and distribute Mainnet APK
run: ./gradlew app:assembleMainnetRelease app:appDistributionUploadMainnetRelease --stacktrace
- name: Upload the APKs
uses: actions/upload-artifact@v4
with:
name: APKs
path: app/build/outputs/**/*.apk
compression-level: 0