service.sh: Better SoC detection #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build encore jni | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["main"] | |
jobs: | |
build: | |
name: Build jni | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: nttld/setup-ndk@v1 | |
with: | |
ndk-version: r27 | |
- name: Build encore-service jni | |
working-directory: ./src | |
run: ndk-build | |
- name: Upload encore-service jni | |
uses: actions/upload-artifact@v4 | |
with: | |
name: encore-service | |
path: ./src/libs | |
- name: Copy binaries | |
run: | | |
rm ./module/libs/armeabi-v7a/DUMMMY && rm ./module/libs/arm64-v8a/DUMMMY | |
cp ./src/libs/armeabi-v7a/encore-service ./module/libs/armeabi-v7a | |
cp ./src/libs/arm64-v8a/encore-service ./module/libs/arm64-v8a | |
- name: Make game list | |
run: | | |
cp LICENSE ./module | |
bash ./gamelist_compile.sh | |
- name: Copy out version | |
id: copyOutVersion | |
run: | | |
version="v1.2" | |
version_code=$(git rev-list HEAD --count) | |
gitsha1=$(git rev-parse --short HEAD) | |
sed -i "s/version=.*/version=$version (GIT@$gitsha1)/" ./module/module.prop | |
sed -i "s/versionCode=.*/versionCode=$version_code/" ./module/module.prop | |
zipName="encore-$version-$version_code_$gitsha1" && echo "zipName=$zipName" >> $GITHUB_OUTPUT | |
- name: Upload .zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.copyOutVersion.outputs.zipName }} | |
compression-level: 9 | |
path: ./module/* |