shanshanzhong 6dfad4544d
Some checks failed
Build Android APK / 编译 Android APK (release) (push) Has been skipped
Build Clash Core / Build Android (arm64) (push) Failing after 7s
Build Multi-Platform / 编译 libcore (iOS/tvOS) (push) Has been skipped
Build Android APK / 编译 libcore.aar (push) Failing after 10s
Build Clash Core / Build Android (armv7) (push) Failing after 7s
Build Clash Core / Build Android (x86_64) (push) Failing after 8s
Build Clash Core / Create Release (push) Has been skipped
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 / 构建 macOS (push) Has been cancelled
Build Multi-Platform / 构建 Linux (push) Has been cancelled
Build Multi-Platform / 构建 iOS (push) Has been cancelled
Build Multi-Platform / 构建 Windows (push) Has been skipped
Build Android APK / 创建 GitHub Release (push) Has been cancelled
Build Multi-Platform / 创建 Release (push) Has been cancelled
ci: 添加多平台构建工作流
添加三个 GitHub Actions 工作流文件:
1. build-clash-core.yml - 构建 Android 核心库
2. build-android-apk.yml - 构建 Android APK
3. build-multiplatform.yml - 支持多平台构建(Android/iOS/Windows/macOS/Linux)

工作流支持自动触发和手动触发,包含构建、测试、打包和发布功能
2025-11-06 17:27:25 -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