-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (57 loc) · 1.91 KB
/
build-and-publish.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
name: Deploy
on:
workflow_dispatch:
push:
branches:
- master
paths:
- "**/src/main/**"
jobs:
build-aab:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
echo "${{ secrets.DEPLOY_SIGNING_KEY }}" | base64 --decode > keystore.jks
echo "${{ secrets.DEPLOY_SIGNING_PROPERTIES }}" | base64 --decode > keystore.properties
echo "${{ secrets.GOOGLE_SERVICES_JSON }}" | base64 --decode > app/google-services.json
echo "${{ secrets.SERVICE_ACCOUNT_JSON }}" | base64 --decode > service-account.json
- run: |
sed -i "s/versionCode 1/versionCode ${{ github.run_number }}/" buildSrc/src/main/groovy/application-conventions.gradle
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: bundleRelease
- uses: actions/upload-artifact@v3
with:
name: release-bundle
path: |
app/**/*.aab
app/**/mapping.txt
publish-aab:
runs-on: ubuntu-latest
needs: [ build-aab ]
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
with:
name: release-bundle
- run: ls -R
- run: |
echo "${{ secrets.SERVICE_ACCOUNT_JSON }}" | base64 --decode > service-account.json
- uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service-account.json
packageName: wiki.depasquale.cursola
releaseFiles: build/outputs/bundle/release/app-release.aab
track: production
status: completed
inAppUpdatePriority: 3
mappingFile: build/outputs/mapping/release/mapping.txt