diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9df25df..63e8cfc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -111,7 +111,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: @@ -189,7 +189,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:" diff --git a/android/app/build.gradle b/android/app/build.gradle index 36025a7..6eac715 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -27,11 +27,21 @@ android { } } + signingConfigs { + release { + storeFile file('release.keystore') + storePassword 'ogame123' + keyAlias 'ogame' + keyPassword 'ogame123' + } + } + buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + signingConfig signingConfigs.release } } @@ -46,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-${defaultConfig.versionName}-${abi}.apk" + output.outputFileName = "OGame-${defaultConfig.versionName}-${abi}.APK" } } } diff --git a/android/app/release.keystore b/android/app/release.keystore new file mode 100644 index 0000000..acbdfad Binary files /dev/null and b/android/app/release.keystore differ