shanshanzhong dbf6175ad9
Some checks failed
Build Android APK / 编译 libcore.aar (push) Failing after 8s
Build Android APK / 编译 Android APK (release) (push) Has been skipped
Build Multi-Platform / 编译 libcore (iOS/tvOS) (push) Failing after 6s
Build Windows / 编译 libcore (Windows) (20.15.1) (push) Successful in 20m0s
Build Windows / build (push) Failing after 7h1m17s
Build Android APK / 创建 GitHub Release (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Android) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Windows) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (macOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Linux) (push) Has been cancelled
Build Multi-Platform / 构建 Android APK (push) Has been cancelled
Build Multi-Platform / 构建 Windows (push) Has been cancelled
Build Multi-Platform / 构建 macOS (push) Has been cancelled
Build Multi-Platform / 构建 Linux (push) Has been cancelled
Build Multi-Platform / 创建 Release (push) Has been cancelled
Build Multi-Platform / 构建 iOS (push) Has been cancelled
ci(workflow): 将actions/upload-artifact和actions/download-artifact从v4降级到v3
2025-11-06 00:05:46 -08:00
..

GitHub Actions 构建说明

📋 工作流概览

build-android-apk.yml - Android APK 自动构建

触发条件:

  • 推送到 maindevelop 分支
  • v* 标签时自动创建 Release
  • 手动触发Actions 页面点击 "Run workflow"

构建产物:

  • libcore.aar - sing-box 核心库
  • BearVPN-arm64-v8a-*.apk - 64位 ARM 版本(推荐)
  • BearVPN-armeabi-v7a-*.apk - 32位 ARM 版本
  • BearVPN-x86_64-*.apk - 模拟器版本

🚀 使用方法

方法一:推送代码自动构建

git add .
git commit -m "feat: 新功能"
git push origin main

方法二:手动触发

  1. 打开仓库 Actions 页面
  2. 点击 Build Android APK
  3. 点击 Run workflow

方法三:创建 Release

git tag v1.0.0
git push origin v1.0.0

📦 下载构建产物

  • Actions 页面: 点击运行记录 → Artifacts 区域下载
  • Releases 页面: 选择版本 → Assets 下载

🔧 配置 Release 签名(可选)

  1. 生成密钥:
keytool -genkey -v -keystore release.keystore -alias bearvpn -keyalg RSA -keysize 2048 -validity 10000
  1. 转换为 Base64
base64 release.keystore > keystore.base64.txt
  1. 在 GitHub 仓库 Settings → Secrets 添加:
    • KEYSTORE_BASE64
    • KEYSTORE_PASSWORD
    • KEY_ALIAS
    • KEY_PASSWORD

⏱️ 构建时间

  • libcore.aar: 10-15 分钟
  • Flutter APK: 15-20 分钟
  • 总计: 约 30 分钟

🐛 常见问题

Q: 构建失败 "libcore.aar not found"
A: 检查 libcore 子模块是否正确初始化

Q: Release 未创建
A: 标签必须以 v 开头,如 v1.0.0


生成时间: 2025-10-27