-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 2.03 KB
/
play-store.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
name: Play Store
on:
push:
jobs:
play-store:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Set up ruby env
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.0
bundler-cache: true
- name: Decode Service Account Key JSON File
uses: timheuer/base64-to-file@v1
id: service_account_json_file
with:
fileName: "serviceAccount.json"
encodedString: ${{ secrets.PLAY_STORE_SERVICE_ACCOUNT_JSON }}
- name: Decode Keystore File
uses: timheuer/base64-to-file@v1
id: android_keystore
with:
fileName: "android_keystore.keystore"
encodedString: ${{ secrets.PLAY_STORE_UPLOAD_KEYSTORE }}
- name: Build & validate Android release
id: validate-release
if: github.ref != 'refs/heads/main'
run: bundle exec fastlane android deploy dry_run:true
env:
STORE_FILE: ${{ steps.android_keystore.outputs.filePath }}
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS}}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
ANDROID_JSON_KEY_FILE: ${{ steps.service_account_json_file.outputs.filePath }}
- name: Build & deploy Android release
if: github.ref == 'refs/heads/main'
run: bundle exec fastlane android deploy dry_run:false
env:
STORE_FILE: ${{ steps.android_keystore.outputs.filePath }}
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS}}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
ANDROID_JSON_KEY_FILE: ${{ steps.service_account_json_file.outputs.filePath }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: release_aab
path: |
${{ github.workspace }}/app/build/outputs/bundle/release