This document outlines the infrastructure and CI/CD setup for RandomTimer-Native.
We follow a modified GitFlow approach:
developis the main development branch- Feature branches are created from
develop mainis protected and only receives changes through releases- All work must go through PRs to
develop - Releases are created from
developtomain
-
CI Pipeline (
ci.yml)- Runs on PRs and pushes to develop
- Validates code quality
- Runs security checks
- Creates development builds
-
Security Pipeline (
security.yml)- Daily security scans
- Dependency checks
- Code analysis
- Mobile security
-
Release Pipeline (
release.yml)- Handles versioned releases
- Creates production builds
- Manages app store submissions
-
Analytics Pipeline (
analytics.yml)- Weekly performance reports
- Security metrics
- Deployment statistics
- Required status checks:
- CI: validate
- CI: security
- CI: build
- Required reviews: 1
- Dismiss stale reviews
- No direct pushes
- All develop protections plus:
- Required reviews: 2
- Admin approval required
- No force push
- Required linear history
- Release workflow required
- Protected environment
- Single reviewer required
- 5-minute wait timer
- Deploys from develop
- Protected environment
- Two reviewers required
- 15-minute wait timer
- Admin approval required
- Deploys from main via release tags
- CodeQL analysis
- SAST scanning
- Secret scanning
- Mobile security framework
- OWASP dependency check
- npm audit
- Snyk integration
- Dependency review
- SBOM generation
- Build provenance
- Artifact signing
- Cache security
- Build success rates
- Average duration
- Cache hit rates
- Resource usage
- Vulnerability trends
- Dependency alerts
- Secret scanning alerts
- Security review stats
- Success rates by environment
- Time to deployment
- Rollback frequency
- Environment stability
-
Branch Governance
Repository rulesets are the canonical merge gate for
developandmain. Audit the live ruleset with:gh api repos/IgorGanapolsky/Random-Timer/rules/branches/develop gh api repos/IgorGanapolsky/Random-Timer/rules/branches/main
-
Environments
- Create via GitHub UI
- Use
.github/environments.ymlas reference - Configure protection rules
- Set up required secrets
-
Required Secrets
# CI/CD EXPO_TOKEN: "Expo account token" EXPO_PUBLIC_SENTRY_DSN: "Sentry DSN" # iOS APPSTORE_PRIVATE_KEY: "App Store Connect API key" APPSTORE_KEY_ID: "Key ID" APPSTORE_ISSUER_ID: "Issuer ID" # Android GOOGLE_SERVICE_ACCOUNT_JSON: "Service account JSON" # Notifications SLACK_WEBHOOK_URL: "Slack webhook" # Security SNYK_TOKEN: "Snyk API token"
- Review analytics reports
- Check security alerts
- Audit environment access
- Review cache usage
- Rotate access tokens
- Review protection rules
- Update action versions
- Audit permissions
- Security policy review
- Performance optimization
- Infrastructure update
- Dependency strategy review