-
Notifications
You must be signed in to change notification settings - Fork 8
81 lines (65 loc) · 2.04 KB
/
release-android.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: release-android
on:
workflow_dispatch:
concurrency:
cancel-in-progress: true
group: release-android
# Needed secrets :
# DOTENV
# GOOGLE_CLOUD_API_KEY_B64
# KEY_PROPERTIES
# KEYSTORE_B64
jobs:
release-android:
name: Build and release Android app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: "16.x"
cache: 'yarn'
cache-dependency-path: "app/yarn.lock"
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: 11
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- uses: actions/setup-ruby@v1
with:
ruby-version: "2.x"
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Write .env
shell: bash
run: |
echo "${{ secrets.DOTENV}}" > app/.env
- name: Write Google Cloud API Key
shell: bash
run: |
echo "${{ secrets.GOOGLE_CLOUD_API_KEY_B64}}" | base64 --decode > app/android/fastlane/google-cloud-api-key.json
- name: Write key properties
shell: bash
run: |
echo "${{ secrets.KEY_PROPERTIES}}" > app/android/key.properties
- name: Write key store
shell: bash
run: |
echo "${{ secrets.KEYSTORE_B64}}" | base64 --decode > app/android/app/my-upload-key.jks
- name: Install Fastlane
run: cd app/android && bundle install
- name: remove ios part of post install
run: cd app && npm pkg set scripts.postinstall="npx jetify"
- name: Install packages
run: cd app && yarn install
- name: Execute Fastlane command
run: cd app && yarn publish:android