diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2897f60..2c7e563 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -210,19 +210,60 @@ jobs: - name: 初始化 Android 项目 run: pnpm tauri android init - - name: 构建 Android(ARM64) - run: pnpm tauri android build --target aarch64 + - name: 构建 Android Universal APK + run: pnpm tauri android build --target aarch64 --target armv7 --target x86_64 - - name: 构建 Android(ARMv7) - run: pnpm tauri android build --target armv7 + - name: 安装 Android SDK Build Tools + env: + ANDROID_SIGNING_KEY: ${{ secrets.ANDROID_SIGNING_KEY }} + if: ${{ env.ANDROID_SIGNING_KEY != '' }} + run: | + sdkmanager "build-tools;33.0.0" - - name: 构建 Android(x86_64) - run: pnpm tauri android build --target x86_64 + - name: 签名 APK + env: + ANDROID_SIGNING_KEY: ${{ secrets.ANDROID_SIGNING_KEY }} + ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} + ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} + ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }} + if: ${{ env.ANDROID_SIGNING_KEY != '' }} + run: | + # 创建临时密钥库文件 + echo "$ANDROID_SIGNING_KEY" | base64 -d > /tmp/android_keystore.jks + + # 找到所有未签名的 APK 文件 + find src-tauri/gen/android/app/build/outputs -name "*-unsigned.apk" -type f | while read -r apk; do + # 生成签名后的文件名 + signed_apk="${apk/-unsigned/-signed}" + + # 使用 apksigner 签名 + "${ANDROID_SDK_ROOT}/build-tools/33.0.0/apksigner" sign \ + --ks /tmp/android_keystore.jks \ + --ks-key-alias "$ANDROID_KEY_ALIAS" \ + --ks-pass pass:"$ANDROID_STORE_PASSWORD" \ + --key-pass pass:"$ANDROID_KEY_PASSWORD" \ + --out "$signed_apk" \ + "$apk" + + echo "已签名: $signed_apk" + + # 验证签名 + "${ANDROID_SDK_ROOT}/build-tools/33.0.0/apksigner" verify "$signed_apk" + + # 删除未签名版本,重命名签名版本 + rm "$apk" + mv "$signed_apk" "${apk/-unsigned/}" + done + + # 清理密钥库 + rm -f /tmp/android_keystore.jks - uses: actions/upload-artifact@v4 with: name: dist-android - path: src-tauri/gen/android/app/build/outputs/**/*.apk + path: | + src-tauri/gen/android/app/build/outputs/**/*.apk + !src-tauri/gen/android/app/build/outputs/**/*-unsigned.apk release: needs: [parse, build_win, build_mac, build_linux, build_android] diff --git a/public/favicon.svg b/public/favicon.svg index ae889c5..39a5ac6 100644 --- a/public/favicon.svg +++ b/public/favicon.svg @@ -1,11 +1,37 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/SecScore.svg b/resources/SecScore.svg new file mode 100644 index 0000000..39a5ac6 --- /dev/null +++ b/resources/SecScore.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/SecScore_logo.ico b/resources/SecScore_logo.ico new file mode 100644 index 0000000..3b58071 Binary files /dev/null and b/resources/SecScore_logo.ico differ diff --git a/src-tauri/icons/icon.png b/src-tauri/icons/icon.png index 46de6e2..e51421f 100644 Binary files a/src-tauri/icons/icon.png and b/src-tauri/icons/icon.png differ diff --git a/src/assets/logoHD.svg b/src/assets/logoHD.svg index 51ff5ea..39a5ac6 100644 --- a/src/assets/logoHD.svg +++ b/src/assets/logoHD.svg @@ -1,7 +1,37 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + +