-
Notifications
You must be signed in to change notification settings - Fork 33
60 lines (51 loc) · 1.87 KB
/
publish_google_play.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
name: CI/CD Google Play
on:
push:
branches: [ master ]
env:
ossUsername: ${{ secrets.OSSRH_USERNAME }}
ossPassword: ${{ secrets.OSSRH_PASSWORD }}
signingKeyId: ${{ secrets.SIGNINGKEYID }}
signingKeyPassword: ${{ secrets.SIGNINGKEYPASSWORD }}
signingKey: ${{ secrets.SIGNINGKEY }}
ONEGRAVITY_KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
ONEGRAVITY_OPENSOURCE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
ONEGRAVITY_OPENSOURCE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3.3.0
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
# Create a build number based on timestamp / UTC time
- name: set release date
run: |
echo "BUILD_NUMBER=$(date +"%s")" >> ${GITHUB_ENV}
# Decode the keystore file containing the signing key
- name: Decode Keystore
id: decode_keystore
uses: timheuer/base64-to-file@v1.1
with:
fileDir: './secrets'
fileName: '1gravity.keystore'
encodedString: ${{ secrets.KEYSTORE_FILE }}
# Decode the Google Play api key file
- name: Decode Google Play API key
id: decode_api_key
uses: timheuer/base64-to-file@v1.1
with:
fileDir: './secrets'
fileName: 'google-play-api-key.json'
encodedString: ${{ secrets.GOOGLE_PLAY_API_KEY }}
# Build bundle and publish to Google Play
- name: Build & publish to Google Play
run: ./gradlew
-PBUILD_NUMBER="${{ env.BUILD_NUMBER }}"
-PONEGRAVITY_KEYSTORE_FILE="../${{ steps.decode_keystore.outputs.filePath }}"
-PgooglePlayApiKey="../${{ steps.decode_api_key.outputs.filePath }}"
publishBundle --max-workers 1 --stacktrace