Skip to content

Commit

Permalink
ci(actions): add AndroidRelease actions
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai <pingkai010@gmail.com>
  • Loading branch information
pingkai committed Jun 17, 2020
1 parent 908803c commit 02755c6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/AndroidRelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Android Release

on:
push:
branches: [ release/* ]
pull_request:
branches: [ release/* ]

jobs:
build:

runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
- shell: bash
run: mkdir ~/android-env/
- name: specify NDK
run: |
wget "https://dl.google.com/android/repository/android-ndk-r14b-linux-x86_64.zip"
unzip android-ndk-r14b-linux-x86_64.zip -d ~/android-env/
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build Android sdk
run: |
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
export ANDROID_NDK=/home/runner/android-env/android-ndk-r14b
export ANDROID_NDK_ROOT=/home/runner/android-env/android-ndk-r14b
echo "y" | sudo apt-get install ninja-build
echo "y" | sudo apt-get install tree
. setup.env
build_Android
- name: Upload SDK
uses: actions/upload-artifact@v2
with:
name: AndroidSDK
path: output

2 changes: 1 addition & 1 deletion build_player.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function build_Android(){
# sh gradlew build --refresh-dependencies --stacktrace -DALIYUN_APP_VERSION=$SAASPLAYERSDK_VERSION $JAVA_HOME_OPT
# #run twice for copy aar
export ANDROID_FULL_PACKAGE='true'
sh gradlew build --refresh-dependencies --stacktrace $JAVA_HOME_OPT
sh gradlew assembleRelease --refresh-dependencies --stacktrace $JAVA_HOME_OPT

cd ${TOP_DIR}/platform/Android
./package.sh
Expand Down

0 comments on commit 02755c6

Please sign in to comment.