|
| 1 | +# Release Process |
| 2 | + |
| 3 | +This project uses **tag-based releases**. Production deployments only happen when you create a Git tag. |
| 4 | + |
| 5 | +## Quick Release |
| 6 | + |
| 7 | +```bash |
| 8 | +# 1. Ensure main branch is ready |
| 9 | +git checkout main |
| 10 | +git pull |
| 11 | + |
| 12 | +# 2. Create and push a version tag |
| 13 | +git tag v1.0.0 |
| 14 | +git push origin v1.0.0 |
| 15 | +``` |
| 16 | + |
| 17 | +This triggers the production deployment workflow automatically. |
| 18 | + |
| 19 | +## Release Workflow |
| 20 | + |
| 21 | +### 1. Development & Testing |
| 22 | + |
| 23 | +- Push commits to `main` branch |
| 24 | +- CI runs automatically (tests + build) |
| 25 | +- **No deployment happens** |
| 26 | + |
| 27 | +### 2. Ready to Release |
| 28 | + |
| 29 | +When you're ready to deploy to production: |
| 30 | + |
| 31 | +```bash |
| 32 | +# Create a tag following semantic versioning |
| 33 | +git tag v1.2.3 |
| 34 | + |
| 35 | +# Push the tag to GitHub |
| 36 | +git push origin v1.2.3 |
| 37 | +``` |
| 38 | + |
| 39 | +### 3. Automated Deployment |
| 40 | + |
| 41 | +The tag push triggers `.github/workflows/deploy.yml`: |
| 42 | + |
| 43 | +1. ✅ Run tests |
| 44 | +2. ✅ Build application |
| 45 | +3. ✅ Run database migrations |
| 46 | +4. ✅ Deploy to Cloudflare Workers (openboot.dev) |
| 47 | + |
| 48 | +### 4. Verify Deployment |
| 49 | + |
| 50 | +Check GitHub Actions: https://github.com/openbootdotdev/openboot.dev/actions |
| 51 | + |
| 52 | +## Version Numbering |
| 53 | + |
| 54 | +Follow [Semantic Versioning](https://semver.org/): |
| 55 | + |
| 56 | +- **v1.0.0** → Major release (breaking changes) |
| 57 | +- **v1.1.0** → Minor release (new features, backward compatible) |
| 58 | +- **v1.1.1** → Patch release (bug fixes) |
| 59 | + |
| 60 | +### Examples |
| 61 | + |
| 62 | +```bash |
| 63 | +# Bug fix |
| 64 | +git tag v1.0.1 |
| 65 | +git push origin v1.0.1 |
| 66 | + |
| 67 | +# New feature |
| 68 | +git tag v1.1.0 |
| 69 | +git push origin v1.1.0 |
| 70 | + |
| 71 | +# Breaking change |
| 72 | +git tag v2.0.0 |
| 73 | +git push origin v2.0.0 |
| 74 | +``` |
| 75 | + |
| 76 | +## Rollback |
| 77 | + |
| 78 | +If a deployment has issues: |
| 79 | + |
| 80 | +```bash |
| 81 | +# Option 1: Deploy previous version |
| 82 | +git push origin v1.0.0 --force-with-lease |
| 83 | + |
| 84 | +# Option 2: Create hotfix tag |
| 85 | +git tag v1.0.2 |
| 86 | +git push origin v1.0.2 |
| 87 | +``` |
| 88 | + |
| 89 | +## Manual Deployment |
| 90 | + |
| 91 | +You can also trigger deployment manually from GitHub: |
| 92 | + |
| 93 | +1. Go to Actions → Deploy to Production |
| 94 | +2. Click "Run workflow" |
| 95 | +3. Select `main` branch |
| 96 | +4. Click "Run workflow" |
| 97 | + |
| 98 | +## Release Checklist |
| 99 | + |
| 100 | +Before tagging a release: |
| 101 | + |
| 102 | +- [ ] All tests passing on `main` |
| 103 | +- [ ] Migrations tested locally |
| 104 | +- [ ] Breaking changes documented |
| 105 | +- [ ] Version number follows semver |
| 106 | +- [ ] Previous version tagged (for rollback reference) |
| 107 | + |
| 108 | +## Migration Strategy |
| 109 | + |
| 110 | +Database migrations run automatically before deployment. Ensure: |
| 111 | + |
| 112 | +1. Migration is backward compatible (if possible) |
| 113 | +2. Migration tested with `wrangler d1 migrations apply openboot --local` |
| 114 | +3. Large migrations coordinated with zero-downtime deployment |
| 115 | + |
| 116 | +## FAQ |
| 117 | + |
| 118 | +**Q: Can I delete a tag?** |
| 119 | +```bash |
| 120 | +# Delete local tag |
| 121 | +git tag -d v1.0.0 |
| 122 | + |
| 123 | +# Delete remote tag |
| 124 | +git push origin :refs/tags/v1.0.0 |
| 125 | +``` |
| 126 | + |
| 127 | +**Q: What happens if deployment fails?** |
| 128 | +- GitHub Actions will show the error |
| 129 | +- Previous version remains deployed |
| 130 | +- Fix the issue and create a new tag |
| 131 | + |
| 132 | +**Q: How do I see what's deployed?** |
| 133 | +- Check latest tag: `git describe --tags --abbrev=0` |
| 134 | +- View deployment history in GitHub Actions |
0 commit comments