workflow: Fix Unable to process file command 'output' successfully #7
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 | |
cp LICENSE ./module | |
- name: Compile Gamelist | |
run: | | |
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 build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.copyOutVersion.outputs.zipName }} | |
compression-level: 9 | |
path: ./module/* |