-
Notifications
You must be signed in to change notification settings - Fork 6
112 lines (92 loc) · 3.34 KB
/
release-beta-android.yml
File metadata and controls
112 lines (92 loc) · 3.34 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Google-Play-Android-Distribution
on:
# Triggers the workflow on push or pull request events but only for the study branch
push:
branches: [study]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-android:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout project
uses: actions/checkout@master
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Ionic
run: npm install -g @ionic/cli
- name: Run ionic build
run: |
npm install npm@8 -g
npm ci
ionic cap build android --no-interactive --no-open --confirm --prod
- name: Setup Android NDK
uses: nttld/setup-ndk@v1.2.0
with:
ndk-version: r21d
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Setup Android keystore
working-directory: ./android
run: |
echo $ANDROID_KEYSTORE | base64 -di > simport.keystore
ls -lah
env:
ANDROID_KEYSTORE: ${{ secrets.GOOGLE_PLAY_ANDROID_KEYSTORE }}
- name: Bump version
uses: chkfung/android-version-actions@v1.2.1
with:
gradlePath: ./android/app/build.gradle
versionCode: ${{ github.run_number }}
- name: '[.aab] Build with Gradle'
working-directory: ./android
run: ./gradlew app:bundleRelease
env:
ANDROID_PATH_TO_KEYSTORE: '../simport.keystore'
ANDROID_KEY_STORE_PASSWORD: ${{ secrets.GOOGLE_PLAY_ANDROID_KEY_STORE_PASSWORD }}
ANDROID_KEY_ALIAS: ${{ secrets.GOOGLE_PLAY_ANDROID_KEY_ALIAS }}
ANDROID_KEY_PASSWORD: ${{ secrets.GOOGLE_PLAY_ANDROID_KEY_PASSWORD }}
- name: '[.aab] Archive build artifact'
uses: actions/upload-artifact@master
with:
name: aab-artifact
path: android/app/build/outputs/bundle/release/app-release.aab
- name: '[.apk] Build with Gradle'
working-directory: ./android
run: ./gradlew app:assembleRelease
env:
ANDROID_PATH_TO_KEYSTORE: '../simport.keystore'
ANDROID_KEY_STORE_PASSWORD: ${{ secrets.GOOGLE_PLAY_ANDROID_KEY_STORE_PASSWORD }}
ANDROID_KEY_ALIAS: ${{ secrets.GOOGLE_PLAY_ANDROID_KEY_ALIAS }}
ANDROID_KEY_PASSWORD: ${{ secrets.GOOGLE_PLAY_ANDROID_KEY_PASSWORD }}
- name: '[.apk] Archive build artifact'
uses: actions/upload-artifact@master
with:
name: apk-artifact
path: android/app/build/outputs/apk/release/app-release.apk
deploy-android:
needs: [build-android]
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@master
- name: Download build artifact
uses: actions/download-artifact@master
with:
name: aab-artifact
path: ./
- name: Upload on play store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
packageName: de.ifgi.simport.learning
releaseFiles: app-release.aab
track: internal