From c3948901469f93178fb91c5f6e65435a5cac6e9e Mon Sep 17 00:00:00 2001 From: Jesussss <204093@qq.com> Date: Mon, 18 Dec 2023 11:23:22 +0800 Subject: [PATCH 1/6] Update release.yml --- .github/workflows/release.yml | 129 +--------------------------------- 1 file changed, 1 insertion(+), 128 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8ffea99..637da304 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,131 +40,4 @@ jobs: - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: ./run lib core - build: - name: Build OSS APK - runs-on: ubuntu-latest - needs: - - libcore - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Golang Status - run: find buildScript libcore/*.sh | xargs cat | sha1sum > golang_status - - name: Libcore Status - run: git ls-files libcore | xargs cat | sha1sum > libcore_status - - name: LibCore Cache - uses: actions/cache@v3 - with: - path: | - app/libs/libcore.aar - key: ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }} - - name: Gradle cache - uses: actions/cache@v3 - with: - path: ~/.gradle - key: gradle-oss-${{ hashFiles('**/*.gradle.kts') }} - - name: Gradle Build - env: - BUILD_PLUGIN: none - run: | - echo "sdk.dir=${ANDROID_HOME}" > local.properties - echo "ndk.dir=${ANDROID_HOME}/ndk/25.0.8775105" >> local.properties - export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}" - ./run init action gradle - ./gradlew app:assembleOssRelease - APK=$(find app/build/outputs/apk -name '*arm64-v8a*.apk') - APK=$(dirname $APK) - echo "APK=$APK" >> $GITHUB_ENV - - uses: actions/upload-artifact@v3 - with: - name: APKs - path: ${{ env.APK }} - publish: - name: Publish Release - if: github.event.inputs.publish != 'y' - runs-on: ubuntu-latest - needs: build - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Donwload Artifacts - uses: actions/download-artifact@v3 - with: - name: APKs - path: artifacts - - name: Release - run: | - wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz - tar -xvf ghr.tar.gz - mv ghr*linux_amd64/ghr . - mkdir apks - find artifacts -name "*.apk" -exec cp {} apks \; - ./ghr -delete -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" apks - upload: - name: Upload Release - if: github.event.inputs.upload != 'y' - runs-on: ubuntu-latest - needs: build - steps: - - name: Donwload Artifacts - uses: actions/download-artifact@v3 - with: - name: APKs - path: artifacts - - name: Release - run: | - mkdir apks - find artifacts -name "*.apk" -exec cp {} apks \; - - function upload() { - for apk in $@; do - echo ">> Uploading $apk" - curl https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendDocument \ - -X POST \ - -F chat_id="${{ secrets.TELEGRAM_CHANNEL }}" \ - -F document="@$apk" \ - --silent --show-error --fail >/dev/null & - done - for job in $(jobs -p); do - wait $job || exit 1 - done - } - upload apks/* - play: - name: Build Play Bundle - if: github.event.inputs.play != 'y' - runs-on: ubuntu-latest - needs: - - libcore - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Golang Status - run: find buildScript libcore/*.sh | xargs cat | sha1sum > golang_status - - name: Libcore Status - run: git ls-files libcore | xargs cat | sha1sum > libcore_status - - name: LibCore Cache - uses: actions/cache@v3 - with: - path: | - app/libs/libcore.aar - key: ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }} - - name: Gradle cache - uses: actions/cache@v3 - with: - path: ~/.gradle - key: gradle-play-${{ hashFiles('**/*.gradle.kts') }} - - name: Checkout Library - run: | - git submodule update --init 'app/*' - - name: Gradle Build - run: | - echo "sdk.dir=${ANDROID_HOME}" > local.properties - echo "ndk.dir=${ANDROID_HOME}/ndk/25.0.8775105" >> local.properties - export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}" - ./run init action gradle - ./gradlew bundlePlayRelease - - uses: actions/upload-artifact@v3 - with: - name: AAB - path: app/build/outputs/bundle/playRelease/app-play-release.aab + From d6735689339fb2b31ab6d3167e47646428434339 Mon Sep 17 00:00:00 2001 From: Jesussss <204093@qq.com> Date: Mon, 18 Dec 2023 11:35:15 +0800 Subject: [PATCH 2/6] Update release.yml --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 637da304..0dbae7fd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,4 +40,9 @@ jobs: - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: ./run lib core + - name: 'Upload Artifact' + uses: actions/actions/checkout@v3 + with: + name: libcore.aar + path: app/libs/libcore.aar From 254b90fdb7d410bbe1813817542fec650cbef480 Mon Sep 17 00:00:00 2001 From: Jesussss <204093@qq.com> Date: Mon, 18 Dec 2023 11:36:38 +0800 Subject: [PATCH 3/6] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0dbae7fd..7d6e6b40 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,7 +41,7 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: ./run lib core - name: 'Upload Artifact' - uses: actions/actions/checkout@v3 + uses: actions/checkout@v3 with: name: libcore.aar path: app/libs/libcore.aar From 72ace703e80a4901ea16508b2202147997d1402e Mon Sep 17 00:00:00 2001 From: Jesussss <204093@qq.com> Date: Mon, 18 Dec 2023 11:43:50 +0800 Subject: [PATCH 4/6] Update release.yml --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d6e6b40..315e54c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,8 +40,8 @@ jobs: - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: ./run lib core - - name: 'Upload Artifact' - uses: actions/checkout@v3 + - name: Upload lib + uses: actions/upload-artifact@v3 with: name: libcore.aar path: app/libs/libcore.aar From a8d83d4a46bed3de59ddd7cd16f699896d843889 Mon Sep 17 00:00:00 2001 From: Jesussss <204093@qq.com> Date: Wed, 20 Dec 2023 12:53:14 +0800 Subject: [PATCH 5/6] Update nb4a.go --- libcore/nb4a.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcore/nb4a.go b/libcore/nb4a.go index 97ae290d..70738466 100644 --- a/libcore/nb4a.go +++ b/libcore/nb4a.go @@ -36,7 +36,7 @@ func InitCore(process, cachePath, internalAssets, externalAssets string, if1 NB4AInterface, if2 BoxPlatformInterface, ) { defer device.DeferPanicToError("InitCore", func(err error) { log.Println(err) }) - isBgProcess := strings.HasSuffix(process, ":bg") + isBgProcess := true//strings.HasSuffix(process, ":bg") neko_common.RunMode = neko_common.RunMode_NekoBoxForAndroid intfNB4A = if1 From 38d6774bb27c3515d8f8c31cd8c8ad32cf2c2e1a Mon Sep 17 00:00:00 2001 From: Jesussss <204093@qq.com> Date: Wed, 20 Dec 2023 12:56:54 +0800 Subject: [PATCH 6/6] Update nb4a.go --- libcore/nb4a.go | 1 - 1 file changed, 1 deletion(-) diff --git a/libcore/nb4a.go b/libcore/nb4a.go index 70738466..1676aa92 100644 --- a/libcore/nb4a.go +++ b/libcore/nb4a.go @@ -5,7 +5,6 @@ import ( "os" "path/filepath" "runtime" - "strings" _ "unsafe" "log"