fix: 统一APK文件扩展名为小写.apk

将构建产物及相关CI流程中的APK文件扩展名由大写.APK统一为小写.apk,提升平台兼容性并避免文件识别问题。
This commit is contained in:
谦君
2025-12-25 19:26:44 +08:00
parent ebed10b82f
commit b6bcae3294
2 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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"
}
}
}