-
Notifications
You must be signed in to change notification settings - Fork 18
60 lines (51 loc) · 1.9 KB
/
ps-release.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: Build & Release APK to PlayStore
on:
push:
tags:
- "*.*.*"
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Populate keystore.properties
run: |
echo "storePassword=${{ secrets.SIGNING_STORE_PASSWORD }}" >> keystore.properties
echo "keyPassword=${{ secrets.SIGNING_KEY_PASSWORD }}" >> keystore.properties
echo "keyAlias=${{ secrets.SIGNING_KEY_ALIAS }}" >> keystore.properties
- name: Set version variable
run: |
VERSION_NAME=$(echo "${{ github.ref_name }}" | egrep -o '[0-9]+\.[0-9]+\.[0-9]+')
echo "version_name=$VERSION_NAME" >> "$GITHUB_ENV"
- name: Decode Keystore
env:
ENCODED_RELEASE_KEYSTORE: ${{ secrets.ENCODED_RELEASE_KEYSTORE }}
run: echo $ENCODED_RELEASE_KEYSTORE | base64 -d > keystore
- name: Build & Assemble Release APK
env:
VERSION_CODE: ${{ github.run_number }}
VERSION_NAME: ${{ env.version_name }}
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
run: |
./gradlew assembleRelease
- name: Upload to Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.PLAY_STORE_CREDENTIALS }}
packageName: com.willowtree.vocable
releaseFiles: app/build/outputs/apk/release/app-release.apk
track: production
- uses: marvinpinto/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
files: |
app/build/outputs/apk/release/app-release.apk