-
Notifications
You must be signed in to change notification settings - Fork 28
61 lines (53 loc) · 1.69 KB
/
cd.yaml
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
name: CD
on:
workflow_run:
workflows: ["ci"]
types:
- completed
jobs:
apk:
name: Build Release signed APK
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: '17'
- name: Build Release APK
run: ./gradlew assembleRelease
- name: Sign APK
uses: r0adkll/sign-android-release@v1
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "30.0.2"
- name: Upload Signed APK
uses: actions/upload-artifact@v2
with:
name: sample-app-signed # Artifact Name
path: app/build/outputs/apk/release/*.apk
deploy:
name: Deploy release AAB on Playstore
needs: [apk]
runs-on: ubuntu-latest
steps:
- name: Create service_account.json
run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json
- name: Deploy to Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service_account.json
packageName: ${{ github.event.inputs.app_id }}
releaseFiles: app/build/outputs/bundle/release/*.aab
track: internal
whatsNewDirectory: whatsnew/
mappingFile: app/build/outputs/mapping/release/mapping.txt
inAppUpdatePriority: 5