-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (74 loc) · 2.65 KB
/
android-build.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Deploy Android build Google Play internal testing
on:
release:
types: [created]
push:
tags:
- 'v*'
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: Cache NPM dependencies
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-npm-cache-
- name: Install npm dependencies
run: |
npm ci
- name: Install Waggle
run: |
cd nodejs-assets/nodejs-project
npm ci
- name: Remove incompatible dependencies
run: |
cd nodejs-assets/nodejs-project
rm -rf node_modules/wrtc
- name: Apply mobile patch
run: |
cd nodejs-assets/nodejs-project
patch -f -p0 < modules.patch
sed -i "s/.*wrtc.*/ \"wrtc\": \"..\/..\/wrtc-mock\"/" node_modules/waggle/package.json
- name: Prepare signing configuration
run: |
mkdir -p $HOME/.gradle
printf "\
ZBAY_UPLOAD_STORE_FILE=zbaymobile.keystore\n\
ZBAY_UPLOAD_KEY_ALIAS=${{ SECRETS.GOOGLE_KEYSTORE_ALIAS }}
ZBAY_UPLOAD_STORE_PASSWORD=${{ SECRETS.GOOGLE_KEYSTORE_PASSWORD }}\n\
ZBAY_UPLOAD_KEY_PASSWORD=${{ SECRETS.GOOGLE_KEYSTORE_PASSWORD }}\
" > $HOME/.gradle/gradle.properties
echo ${{ SECRETS.GOOGLE_KEYSTORE }} | base64 --decode > android/app/zbaymobile.keystore
- name: Build for Android
run: cd android && ./gradlew bundleRelease
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: app-release.aab
path: ./android/app/build/outputs/bundle/release/app-release.aab
retention-days: 5
- name: Configure Google Pay upload
run: |
mkdir -p distribution/whatsnew
git log -1 --pretty=format:%s > distribution/whatsnew/whatsnew-pl-PL
echo ${{ SECRETS.SERVICE_ACCOUNT_JSON }} | base64 --decode > google-play.json
- name: 'Upload to Google Play'
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: google-play.json
packageName: com.zbaymobile
releaseFiles: ./android/app/build/outputs/bundle/release/app-release.aab
track: internal
whatsNewDirectory: distribution/whatsnew