Production Release Runbook¶
Cập nhật: 16/05/2026
Tài liệu này là runbook ngắn để team kiểm tra mọi cấu hình production trước khi promote BeFam từ main.
1. Kiểm tra GitHub production environment¶
Chuẩn bị:
- Đăng nhập
gh auth login - Có quyền đọc
phamhungptithcm/gia-pha
Chạy audit:
./scripts/audit_github_environment.sh --repo phamhungptithcm/gia-pha --env production --strict
./scripts/audit_github_environment.sh --repo phamhungptithcm/gia-pha --env staging --strict
Script sẽ kiểm tra:
- GitHub
productionvars còn thiếu - GitHub
productionsecrets còn thiếu mobile/befam/web/app-ads.txtđã thay placeholder hay chưaprevent_self_reviewcủa environmentproduction
Nếu script fail, không promote production.
2. Điền GitHub vars/secrets production¶
Nguồn template:
scripts/github-production.env.examplescripts/setup_github_production_config.sh
Thiết lập:
source scripts/github-production.env.example
# điền giá trị thật
./scripts/setup_github_production_config.sh --repo phamhungptithcm/gia-pha --env production
Các nhóm phải có đủ:
- Firebase production vars
- App runtime vars
- Real AdMob app IDs và unit IDs
- Android signing secrets
- iOS signing secrets
- OIDC deploy secrets
3. Hoàn tất app-ads.txt¶
File cần điền:
mobile/befam/web/app-ads.txt
Format:
google.com, pub-1234567890123456, DIRECT, f08c47fec0942fa0
Yêu cầu:
- Thay
pub-xxxxxxxxxxxxxxxxbằng publisher ID thật của AdMob - Commit file vào repo trước khi cắt RC production
- Không dùng placeholder hoặc comment TODO ở production
4. Cắt release candidate từ main¶
Điều kiện:
- Branch CI xanh
- Không còn
Blockertrongproduction-readiness-checklist.md - Audit GitHub production env pass
- Bộ test trong
TEST_CASES.mdđã được chạy và ghi nhận evidence
Sau đó:
- Merge code vào
main - Chờ
CD - Release Mainchạy xong - Lấy
release_tagđã publish - Cài artifact Android/iOS lên máy thật hoặc store test channel
- Chạy smoke test release
5. Smoke test tối thiểu¶
- OTP phone login
- child login
- push notification background
- create genealogy
- create branch
- funds
- scholarship
- billing
- legal pages
/privacy,/terms,/account-deletion
Nếu có lỗi blocker, không promote Firebase/web production và không submit store build.
6. Promote production¶
Sau khi release candidate đã sign-off:
- Run
CD - Deploy Firebase (Production)vớirelease_tag - Verify Functions, Scheduler, Firestore, App Check, logs
- Run
CD - Deploy Web Hosting (Production)với cùngrelease_tag - Verify web production routes, legal pages,
app-ads.txt - Submit Android/iOS binaries vào track test của store
- Promote public release sau khi test pass
7. Chủ sở hữu chính¶
- Platform: GitHub env, workflow, deploy, budgets, alerts
- Mobile: signing, iOS capabilities, RC QA
- Backend/Firebase: Firebase project, App Check, push, scheduler, rules
- Growth: AdMob IDs, app-ads.txt
- Product/Legal: privacy, terms, account deletion policy, store metadata