-
Notifications
You must be signed in to change notification settings - Fork 7
89 lines (71 loc) · 2.57 KB
/
android.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
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
name: Android CI
on:
push:
tags:
- '*'
jobs:
build:
environment: sunbird-ai-assistant
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Install Ionic
run: npm install -g @ionic/cli
- name: Install app dependencies
run: npm install
- name: Install app dependencies
run: npm uninstall cordova-plugin-filepath && npm i https://github.com/swayangjit/cordova-plugin-filepath.git
- name: Convert Windows line endings to Linux from the gradlew file
run: sudo apt update && sudo apt install dos2unix && cd android && dos2unix ./gradlew && cd ..
- name: Make ./gradlew command executable
run: cd android && chmod +x ./gradlew && cd ..
- name: Decode env file
id: decode_env
uses: timheuer/base64-to-file@v1.2
with:
fileName: 'environment.prod.ts'
fileDir: '/home/runner/work/djp-mobile-app/djp-mobile-app/configuration/'
encodedString: ${{ secrets.ENV }}
- name: Decode config file
id: decode_config
uses: timheuer/base64-to-file@v1.2
with:
fileName: 'config.properties'
fileDir: '/home/runner/work/djp-mobile-app/djp-mobile-app/configuration/'
encodedString: ${{ secrets.CONFIG }}
- name: Transform Sunbird Assistant repo to EJP
run: ./build.sh
- name: Copy generated assets from Ionic to Capacitor Android platform
run: npx cap copy android && npx cap update android
- name: Decode Keystore
id: decode_keystore
uses: timheuer/base64-to-file@v1.2
with:
fileName: 'android_keystore.jks'
fileDir: '/home/runner/work/djp-mobile-app/djp-mobile-app/android/app/keystore/'
encodedString: ${{ secrets.KEYSTORE }}
- name: Build bundle
run: cd android && ./gradlew app:bundleRelease
env:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: Build APK
run: cd android && ./gradlew assembleDebug
- name: Upload APK
uses: actions/upload-artifact@v3.1.2
with:
name: app-release
path: ${{ github.workspace }}/android/app/build/outputs/