-
-
Notifications
You must be signed in to change notification settings - Fork 67
79 lines (69 loc) · 2.79 KB
/
Copy pathandroid-release.yml
File metadata and controls
79 lines (69 loc) · 2.79 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Android Release
on:
workflow_call:
secrets:
GRADLE_CACHE_ENCRYPTION_KEY:
required: true
KEYSTORE_FILE:
required: true
KEYSTORE_PASSPHRASE:
required: true
KEYSTORE_KEY_ALIAS:
required: true
KEYSTORE_KEY_PASSWORD:
required: true
KEYSTORE_STORE_PASSWORD:
required: true
DROPBOX_API_KEY:
required: true
REVENUECAT_ANDROID_API_KEY:
required: false
FIREBASE_JSON:
required: true
PLAY_CONFIG:
required: true
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v7
- name: Setup environment
uses: ./.github/actions/setup-gradle
with:
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Refresh translations
run: bash .scripts/refresh-translations.sh
- name: Configure Keystore
run: |
echo '${{ secrets.KEYSTORE_FILE }}' > release.keystore.asc
gpg -d --passphrase '${{ secrets.KEYSTORE_PASSPHRASE }}' --batch release.keystore.asc > androidApp/release.keystore
echo "storeFile=release.keystore" >> keystore.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> keystore.properties
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> keystore.properties
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> keystore.properties
echo "dropbox_key=$DROPBOX_API_KEY" >> keystore.properties
echo "revenuecat_android_api_key=$REVENUECAT_ANDROID_API_KEY" >> keystore.properties
env:
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }}
DROPBOX_API_KEY: ${{ secrets.DROPBOX_API_KEY }}
REVENUECAT_ANDROID_API_KEY: ${{ secrets.REVENUECAT_ANDROID_API_KEY }}
- name: Create Debug dummy Firebase json
run: |
cp config/dummy-google-services.json androidApp/src/debug/google-services.json
- name: Create Firebase json
run: |
echo "$FIREBASE_JSON" > androidApp/src/release/google-services.json.b64
base64 -d -i androidApp/src/release/google-services.json.b64 > androidApp/src/release/google-services.json
env:
FIREBASE_JSON: ${{ secrets.FIREBASE_JSON }}
- name: Create Google Play Config file
run: |
echo "$PLAY_CONFIG_JSON" > play_config.json.b64
base64 -d -i play_config.json.b64 > play_config.json
env:
PLAY_CONFIG_JSON: ${{ secrets.PLAY_CONFIG }}
- name: Distribute app to Alpha track
run: ./gradlew :androidApp:bundleGooglePlayRelease :androidApp:publishGooglePlayReleaseBundle