Files
android-ci-demo/README.md
T
amos 28a92d1831
Android Build / build (push) Has been cancelled
Android Build / release (push) Has been cancelled
Initial Android CI project with Gitea Actions
2026-06-01 19:46:33 +08:00

60 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Android CI Demo
基于 Gitea Actions 的 Android 自动编译项目
## 功能
- ✅ 自动编译 Android APK
- ✅ 缓存 Gradle 依赖
- ✅ 签名 APK(可选)
- ✅ 发布 Release
## 快速开始
1. 在 Gitea 上创建新仓库
2. 推送代码:
```bash
git remote add origin https://gitea.kg8.net/amos/android-ci-demo.git
git push -u origin master
```
3. 触发 CI:推送代码或手动运行 workflow
## 项目结构
```
android-ci-demo/
├── .gitea/
│ └── workflows/
│ └── android-build.yml # Gitea Actions 工作流
├── app/
│ ├── build.gradle # App 模块构建配置
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── com/
│ │ └── example/
│ │ └── demo/
│ │ └── MainActivity.java
│ └── res/
│ └── layout/
│ └── activity_main.xml
├── build.gradle # 项目级构建配置
├── settings.gradle # 项目设置
├── gradle.properties # Gradle 属性
└── gradlew # Gradle Wrapper
```
## 配置签名(可选)
在 Gitea 仓库设置中添加 Secrets
- `ANDROID_KEYSTORE_BASE64`: Keystore 文件的 Base64 编码
- `ANDROID_KEYSTORE_PASSWORD`: Keystore 密码
- `ANDROID_KEY_ALIAS`: Key 别名
- `ANDROID_KEY_PASSWORD`: Key 密码
## License
MIT