move some work into independent jobs (#366)
* change build branch in build.yml * try with get-version * fix get-version * fix get-version again * try use get-version everywhere * use apt upgrade again * fix get-version again * fix get-version again * fix get-version again * fix get-version again * independent get-cc-url * fix get-cc-url * remove 2 useless commands * try action * try fix action * try action * use get-unzip * try windows build * fix build-windows * fix build-love * try build-linux * add shell in build-linux * put `commit id` into `get-version` * fix `updateVersion.py -T Version` * try build-android * add shell into `build-android` * move away android signing from build-android * apply build-android on android mini * gain snapshot action * fixes * fix build-love * use build-macos * put more into build-android * fix build-android * put more into build-macos * fix * fix * ci: use preinstalled ndk (#367) * fix apk location * move `rename` into `build-android` * fix `build-android` * rename variable; remove a level of zips in macOS * shallow clone * remove tons of `./`s * fix icon in windows and linux * reorganize build-android Co-authored-by: 梦飞翔 <1149761294@qq.com>
This commit is contained in:
74
.github/actions/build-android/action.yml
vendored
Normal file
74
.github/actions/build-android/action.yml
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
name: 'build Android'
|
||||
description: 'build Android package'
|
||||
inputs:
|
||||
type:
|
||||
required: true
|
||||
cc-url:
|
||||
required: true
|
||||
code:
|
||||
required: true
|
||||
name:
|
||||
required: true
|
||||
file-path:
|
||||
required: true
|
||||
SIGNING_KEY:
|
||||
required: true
|
||||
KEY_STORE_PASSWORD:
|
||||
required: true
|
||||
ALIAS:
|
||||
required: true
|
||||
KEY_PASSWORD:
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '8'
|
||||
- name: Clone love-android
|
||||
shell: bash
|
||||
run: |
|
||||
git clone --recurse-submodules https://github.com/26F-Studio/love-android -b CI --depth 1 --shallow-submodules
|
||||
- uses: ./.github/actions/build-love
|
||||
with:
|
||||
file-path: love-android/app/src/main/assets/game.love
|
||||
- name: Download ColdClear arm64-v8a
|
||||
uses: ./.github/actions/get-unzip
|
||||
with:
|
||||
url: ${{ inputs.cc-url }}/android_aarch64.zip
|
||||
dir: ColdClear/arm64-v8a
|
||||
- name: Process ColdClear arm64-v8a
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p love-android/app/libs/arm64-v8a
|
||||
mv ColdClear/arm64-v8a/love-11.3-android/lib/arm64-v8a/libcold_clear.so love-android/app/libs/arm64-v8a
|
||||
mkdir -p libAndroid/arm64-v8a
|
||||
mv ColdClear/arm64-v8a/libs/arm64-v8a/libCCloader.so libAndroid/arm64-v8a
|
||||
- name: Download ColdClear armeabi-v7a
|
||||
uses: ./.github/actions/get-unzip
|
||||
with:
|
||||
url: ${{ inputs.cc-url }}/android_armv7.zip
|
||||
dir: ColdClear/armeabi-v7a
|
||||
- name: Process ColdClear armeabi-v7a
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p love-android/app/libs/armeabi-v7a
|
||||
mv ColdClear/armeabi-v7a/love-11.3-android/lib/armeabi-v7a/libcold_clear.so love-android/app/libs/armeabi-v7a
|
||||
mkdir -p libAndroid/armeabi-v7a
|
||||
mv ColdClear/armeabi-v7a/libs/armeabi-v7a/libCCloader.so libAndroid/armeabi-v7a
|
||||
- name: Pack ColdClear
|
||||
shell: bash
|
||||
run: |
|
||||
7z a -tzip love-android/app/src/main/assets/game.love libAndroid
|
||||
- name: Build Techmino
|
||||
shell: bash
|
||||
run: |
|
||||
echo "${{ inputs.SIGNING_KEY }}" | base64 -d > love-android/app/android.keystore
|
||||
python3 .github/workflows/updateVersion.py -T Android${{ inputs.type }} -C ${{ inputs.code }} -N ${{ inputs.name }} -S ${{ inputs.KEY_STORE_PASSWORD }} -A ${{ inputs.ALIAS }} -K ${{ inputs.KEY_PASSWORD }}
|
||||
chmod 777 love-android/gradlew
|
||||
cd love-android/
|
||||
./gradlew assembleRelease
|
||||
- name: rename apk
|
||||
shell: bash
|
||||
run: mv love-android/app/build/outputs/apk/release/app-release.apk ${{ inputs.file-path }}
|
||||
Reference in New Issue
Block a user