From b6bcae3294184041cd3ef0067a1da7a3c1790097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A6=E5=90=9B?= <73606411+setube@users.noreply.github.com> Date: Thu, 25 Dec 2025 19:26:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BB=9F=E4=B8=80APK=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=89=A9=E5=B1=95=E5=90=8D=E4=B8=BA=E5=B0=8F=E5=86=99.apk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将构建产物及相关CI流程中的APK文件扩展名由大写.APK统一为小写.apk,提升平台兼容性并避免文件识别问题。 --- .github/workflows/build.yml | 6 +++--- android/app/build.gradle | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 710382c..7cfb2ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -119,7 +119,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: android-apk - path: android/app/build/outputs/apk/release/*.APK + path: android/app/build/outputs/apk/release/*.apk # 3. 构建 Electron 客户端 build-electron: @@ -206,7 +206,7 @@ jobs: find ./raw-assets/electron-* -type f \( -name "*.exe" -o -name "*.dmg" -o -name "*.AppImage" -o -name "*.zip" \) -exec cp {} ./final-release/ \; # 移动 Android APK - find ./raw-assets/android-apk -type f -name "*.APK" -exec cp {} ./final-release/ \; || true + find ./raw-assets/android-apk -type f -name "*.apk" -exec cp {} ./final-release/ \; || true # 检查结果 echo "Final assets to upload:" @@ -217,7 +217,7 @@ jobs: run: | VERSION=${{ steps.get_version.outputs.VERSION }} # 获取 release 中的现有 assets 并删除 APK 文件 - gh release view "$VERSION" --json assets -q '.assets[].name' 2>/dev/null | grep -i '\.APK$' | while read asset; do + gh release view "$VERSION" --json assets -q '.assets[].name' 2>/dev/null | grep -i '\.apk$' | while read asset; do echo "Deleting existing asset: $asset" gh release delete-asset "$VERSION" "$asset" -y || true done diff --git a/android/app/build.gradle b/android/app/build.gradle index 8479e7d..17ca780 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -56,7 +56,7 @@ android { def abi = output.getFilter(com.android.build.OutputFile.ABI) if (abi != null) { output.versionCodeOverride = abiVersionCode[abi] * 1000 + defaultConfig.versionCode - output.outputFileName = "OGame-Vue-Ts-${abi}.APK" + output.outputFileName = "OGame-Vue-Ts-${abi}.apk" } } }