-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.69 KB
/
buildSignReleaseAndUploadToGooglePlay.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
name: Build, Sign Release App, and Upload To Google Play
on:
release:
types: released
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Access OPEN_WEATHER_API_KEY and MAPS_API_KEY
env:
OPEN_WEATHER_API_KEY: ${{ secrets.OPEN_WEATHER_API_KEY }}
MAPS_API_KEY: ${{ secrets.MAPS_API_KEY }}
run: |
echo OPEN_WEATHER_API_KEY=\"$OPEN_WEATHER_API_KEY\" >> ./local.properties
echo MAPS_API_KEY=\"$MAPS_API_KEY\" >> ./local.properties
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: assemble release
run: ./gradlew assembleRelease
- name: Sign Release
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.KEYSTORE }}
alias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyStorePassword: ${{ secrets.SIGNING_STORE_PASSWORD }}
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Build Artifacts
path: app/build/outputs/
- name: Upload to Google Play
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: com.camp.campingtripplanner
releaseFiles: app/build/outputs/apk/release/app-release-unsigned-signed.apk
track: production