-
Notifications
You must be signed in to change notification settings - Fork 30
60 lines (51 loc) · 2.03 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
name: NLiteAVDemo - Android
on:
push:
branches: [ master, develop, feature/feature_Android ]
pull_request:
branches: [ master ]
jobs:
build_video_stream_java:
name: Build NEChatroom Java
runs-on: windows-latest
env:
CONFIG_FILE_PATH: ${{ './baselib/src/main/cpp/config.cpp' }}
CONFIG_STUB_SCRIPT_PATH: ${{ './workflow/config_stub.py' }}
ENCRYPTED_KEYSTORE_PATH: ${{ './workflow/release.jks.gpg' }}
DECRYPTED_KEYSTORE_PATH: ${{ './workflow/release.jks' }}
UNSIGNED_APK_PATH: ${{ './app/build/outputs/apk/release/app-release-unsigned.apk' }}
SIGNED_APK_PATH: ${{ './app/build/outputs/apk/release/NEVideoCall-Android-Java.apk' }}
APP_KEY: ${{ secrets.APP_KEY }}
BASE_URL: ${{ secrets.API_BASE_URL }}
KEYSTORE_ENC_PWD: ${{ secrets.KEYSTORE_ENC_PWD }}
defaults:
run:
shell: bash
working-directory: ./NLiteAVDemo-Android-Java/
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Setup Python 3.12.4
uses: actions/setup-python@v2
with:
python-version: '3.12.4'
- name: Config Stub
run:
python $CONFIG_STUB_SCRIPT_PATH $CONFIG_FILE_PATH $APP_KEY $BASE_URL
- name: Configure Keystore
run:
gpg -d -o "$DECRYPTED_KEYSTORE_PATH" --pinentry-mode=loopback --passphrase "$KEYSTORE_ENC_PWD" "$ENCRYPTED_KEYSTORE_PATH"
- name: Build APK
run:
./gradlew assembleRelease
- name: Sign APK
run:
/C/'Program Files (x86)'/Android/android-sdk/build-tools/29.0.3/apksigner.bat sign --ks $DECRYPTED_KEYSTORE_PATH --ks-pass pass:$KEYSTORE_ENC_PWD --key-pass pass:$KEYSTORE_ENC_PWD --v1-signing-enabled true --v2-signing-enabled true --in $UNSIGNED_APK_PATH --out $SIGNED_APK_PATH
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: NEVideoCall-Android-Java
path: ./NLiteAVDemo-Android-Java/app/build/outputs/apk/release/NEVideoCall-Android-Java.apk