Files
life-echo/.github/workflows/README.md
Sully cb84c00eca 添加staging release workflow (#22)
* update variable name

* update docker port

* fix alembic migration files

* 给远端 SSH 调用加了 keepalive

* fix app-expo code file format

* comment out quality test threshold

---------

Co-authored-by: Kevin <kevin@brighteng.org>
2026-05-11 11:33:07 +08:00

23 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.
# GitHub Actions 说明
## APIDocker Build and Deploy
- **工作流文件** [docker-build-deploy.yml](docker-build-deploy.yml)
- **测试 job**:在构建镜像前于 `api/` 下执行 `uv sync --dev``pytest`
- **Secrets**:预发无前缀 `SSH_*` / `DEPLOY_PATH`、生产 `PROD_*`、镜像 `ALIYUN_CR_*` — 详见 [SETUP.md](SETUP.md)。
- **分支 / Tag**`main` → Staging 服务器;语义化 tag `v*.*.*` → Production 服务器;路径过滤为 `api/**` 与本 workflow。
- **手动补跑**`workflow_dispatch` 仅支持 `main` / `master`Staging`vMAJOR.MINOR.PATCH` tagProduction。其它 ref 会在测试与构建前失败。
头部注释与 `docker-build-deploy.yml` 内说明为最新权威描述。
## Android Release
构建签名 APK见本文件历史版本中 Android 小节或仓库内 app 模块文档(若已迁移)。
## App Expo Deploy
- **工作流文件**[app-expo-deploy.yml](app-expo-deploy.yml)
- **自动触发**`main``stage`,使用 `app-expo/.env.staging` 构建 APK artifact`v*.*.*` tag → `prod`,使用 `app-expo/.env.production` 并创建 GitHub Release。
- **手动触发**`dev` 可用于内部测试包;`stage` 只允许在 `main` / `master` 上补跑;`prod` 需要选择 `vMAJOR.MINOR.PATCH` tag或在 `main` / `master` 上填写语义化 `version`
- **产物规则**Staging APK 仅上传为 GitHub Actions artifactProduction APK 才创建正式 GitHub Release。