mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-12 07:55:11 +08:00
feat: 配置Android签名与APK后缀大写
新增release.keystore并在build.gradle中配置签名信息,发布包启用签名。统一Android APK文件后缀为大写.APK,调整CI流程相关路径匹配。
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -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:"
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BIN
android/app/release.keystore
Normal file
BIN
android/app/release.keystore
Normal file
Binary file not shown.
Reference in New Issue
Block a user