|
| 1 | +# Release Process |
| 2 | + |
| 3 | +This document describes how to create a new release of BenchMesh. |
| 4 | + |
| 5 | +## Automated Release Process |
| 6 | + |
| 7 | +BenchMesh uses GitHub Actions to automatically build and publish releases when you push a version tag. |
| 8 | + |
| 9 | +### Quick Release Steps |
| 10 | + |
| 11 | +1. **Update version numbers:** |
| 12 | + ```bash |
| 13 | + # Update package.json |
| 14 | + npm version patch # or minor, or major |
| 15 | + |
| 16 | + # Update electron/package.json |
| 17 | + cd electron |
| 18 | + npm version patch |
| 19 | + cd .. |
| 20 | + |
| 21 | + # Update version in benchmesh-serial-service/frontend/package.json |
| 22 | + cd benchmesh-serial-service/frontend |
| 23 | + npm version patch |
| 24 | + cd ../.. |
| 25 | + ``` |
| 26 | + |
| 27 | +2. **Update CHANGELOG.md:** |
| 28 | + ```bash |
| 29 | + # Add release notes |
| 30 | + vim CHANGELOG.md |
| 31 | + ``` |
| 32 | + |
| 33 | +3. **Commit and tag:** |
| 34 | + ```bash |
| 35 | + git add . |
| 36 | + git commit -m "Release v1.0.0" |
| 37 | + git tag v1.0.0 |
| 38 | + git push origin main |
| 39 | + git push origin v1.0.0 |
| 40 | + ``` |
| 41 | + |
| 42 | +4. **Wait for builds:** |
| 43 | + - GitHub Actions will automatically build for Linux, Windows, and macOS |
| 44 | + - Check progress at: https://github.com/YOUR_ORG/BenchMesh/actions |
| 45 | + - Release will be created with all artifacts |
| 46 | + |
| 47 | +### What Gets Built |
| 48 | + |
| 49 | +When you push a tag like `v1.0.0`, the workflow automatically builds: |
| 50 | + |
| 51 | +#### Electron Desktop Apps |
| 52 | +- **Linux**: |
| 53 | + - `BenchMesh-1.0.0-Linux-x86_64.AppImage` (portable) |
| 54 | + - `BenchMesh-1.0.0-amd64.deb` (Debian/Ubuntu installer) |
| 55 | + |
| 56 | +- **Windows**: |
| 57 | + - `BenchMesh-Setup-1.0.0.exe` (installer) |
| 58 | + - `BenchMesh-Portable-1.0.0.exe` (portable) |
| 59 | + |
| 60 | +- **macOS**: |
| 61 | + - `BenchMesh-1.0.0-macOS.dmg` (disk image) |
| 62 | + - `BenchMesh-1.0.0-macOS.zip` (archive) |
| 63 | + |
| 64 | +#### Self-Hosted Web App |
| 65 | +- `benchmesh-web-1.0.0.tar.gz` (complete package with install script) |
| 66 | +- `checksums-web.txt` (SHA256 checksums) |
| 67 | + |
| 68 | +## Manual Release Process |
| 69 | + |
| 70 | +If you need to build manually: |
| 71 | + |
| 72 | +### 1. Prepare Release |
| 73 | + |
| 74 | +```bash |
| 75 | +# Ensure everything is committed |
| 76 | +git status |
| 77 | + |
| 78 | +# Update version |
| 79 | +npm version <major|minor|patch> |
| 80 | + |
| 81 | +# Update CHANGELOG.md with release notes |
| 82 | +``` |
| 83 | + |
| 84 | +### 2. Build Frontend |
| 85 | + |
| 86 | +```bash |
| 87 | +cd benchmesh-serial-service/frontend |
| 88 | +npm ci |
| 89 | +npm run build |
| 90 | +cd ../.. |
| 91 | +``` |
| 92 | + |
| 93 | +### 3. Build Electron Apps |
| 94 | + |
| 95 | +```bash |
| 96 | +# Linux |
| 97 | +npm run electron:build:linux |
| 98 | + |
| 99 | +# Windows (requires Windows or Wine) |
| 100 | +npm run electron:build:win |
| 101 | + |
| 102 | +# macOS (requires macOS) |
| 103 | +npm run electron:build:mac |
| 104 | +``` |
| 105 | + |
| 106 | +### 4. Create Self-Hosted Package |
| 107 | + |
| 108 | +```bash |
| 109 | +# Create archive |
| 110 | +tar -czf benchmesh-web-1.0.0.tar.gz \ |
| 111 | + --exclude=node_modules \ |
| 112 | + --exclude=.git \ |
| 113 | + --exclude=dist \ |
| 114 | + --exclude=electron/node_modules \ |
| 115 | + benchmesh-serial-service \ |
| 116 | + .node-red \ |
| 117 | + start.sh \ |
| 118 | + package.json \ |
| 119 | + package-lock.json \ |
| 120 | + README.md \ |
| 121 | + STARTUP.md |
| 122 | + |
| 123 | +# Generate checksum |
| 124 | +sha256sum benchmesh-web-1.0.0.tar.gz > checksums.txt |
| 125 | +``` |
| 126 | + |
| 127 | +### 5. Create GitHub Release |
| 128 | + |
| 129 | +```bash |
| 130 | +# Create tag |
| 131 | +git tag v1.0.0 |
| 132 | +git push origin v1.0.0 |
| 133 | + |
| 134 | +# Or use GitHub CLI |
| 135 | +gh release create v1.0.0 \ |
| 136 | + --title "BenchMesh v1.0.0" \ |
| 137 | + --notes-file CHANGELOG.md \ |
| 138 | + dist/BenchMesh-*.AppImage \ |
| 139 | + dist/BenchMesh-*.deb \ |
| 140 | + dist/BenchMesh-Setup-*.exe \ |
| 141 | + dist/BenchMesh-Portable-*.exe \ |
| 142 | + dist/BenchMesh-*.dmg \ |
| 143 | + dist/BenchMesh-*-mac.zip \ |
| 144 | + benchmesh-web-*.tar.gz \ |
| 145 | + checksums.txt |
| 146 | +``` |
| 147 | + |
| 148 | +## Version Numbering |
| 149 | + |
| 150 | +BenchMesh uses [Semantic Versioning](https://semver.org/): |
| 151 | + |
| 152 | +- **MAJOR** version: Incompatible API changes |
| 153 | +- **MINOR** version: New functionality, backwards compatible |
| 154 | +- **PATCH** version: Bug fixes, backwards compatible |
| 155 | + |
| 156 | +### Pre-release Versions |
| 157 | + |
| 158 | +- `v1.0.0-alpha.1` - Alpha release |
| 159 | +- `v1.0.0-beta.1` - Beta release |
| 160 | +- `v1.0.0-rc.1` - Release candidate |
| 161 | + |
| 162 | +Pre-release tags automatically mark the GitHub release as "pre-release". |
| 163 | + |
| 164 | +## Release Checklist |
| 165 | + |
| 166 | +Before creating a release: |
| 167 | + |
| 168 | +- [ ] All tests pass: `npm test` (if configured) |
| 169 | +- [ ] Frontend builds: `cd benchmesh-serial-service/frontend && npm run build` |
| 170 | +- [ ] Backend runs: `cd benchmesh-serial-service && python -m pytest` (if tests exist) |
| 171 | +- [ ] Electron builds locally: `npm run electron:build` |
| 172 | +- [ ] Version numbers updated in all package.json files |
| 173 | +- [ ] CHANGELOG.md updated with release notes |
| 174 | +- [ ] README.md updated if needed |
| 175 | +- [ ] Documentation reviewed |
| 176 | +- [ ] All features tested manually |
| 177 | +- [ ] Known issues documented |
| 178 | + |
| 179 | +## Continuous Integration |
| 180 | + |
| 181 | +### Test Workflow (`.github/workflows/test.yml`) |
| 182 | + |
| 183 | +Runs on every push and pull request: |
| 184 | +- Tests frontend build |
| 185 | +- Tests backend loads |
| 186 | +- Tests Electron build process |
| 187 | + |
| 188 | +### Release Workflow (`.github/workflows/release-electron.yml`) |
| 189 | + |
| 190 | +Runs when you push a version tag (e.g., `v1.0.0`): |
| 191 | +1. Creates GitHub release |
| 192 | +2. Builds Electron apps for all platforms in parallel |
| 193 | +3. Builds self-hosted archive |
| 194 | +4. Uploads all artifacts to the release |
| 195 | + |
| 196 | +## Troubleshooting |
| 197 | + |
| 198 | +### Build Fails on GitHub Actions |
| 199 | + |
| 200 | +**Frontend build fails:** |
| 201 | +```bash |
| 202 | +# Test locally first |
| 203 | +cd benchmesh-serial-service/frontend |
| 204 | +npm ci |
| 205 | +npm run build |
| 206 | +``` |
| 207 | + |
| 208 | +**Electron build fails:** |
| 209 | +```bash |
| 210 | +# Check electron build locally |
| 211 | +npm run electron:build |
| 212 | +``` |
| 213 | + |
| 214 | +**macOS build fails:** |
| 215 | +- macOS builds require macOS runner |
| 216 | +- Check Xcode version compatibility |
| 217 | +- Verify code signing (if enabled) |
| 218 | + |
| 219 | +### Release Asset Upload Fails |
| 220 | + |
| 221 | +If asset upload fails: |
| 222 | +1. Go to the GitHub release page |
| 223 | +2. Manually upload the built files from `dist/` directory |
| 224 | +3. Or re-run the failed workflow job |
| 225 | + |
| 226 | +### Version Mismatch |
| 227 | + |
| 228 | +If versions don't match: |
| 229 | +```bash |
| 230 | +# Sync all package.json versions |
| 231 | +./scripts/sync-versions.sh 1.0.0 # if you create this script |
| 232 | +``` |
| 233 | + |
| 234 | +## Post-Release |
| 235 | + |
| 236 | +After release is published: |
| 237 | + |
| 238 | +1. **Announce release:** |
| 239 | + - Update project website/documentation |
| 240 | + - Post on social media/forums |
| 241 | + - Notify users |
| 242 | + |
| 243 | +2. **Monitor issues:** |
| 244 | + - Watch for bug reports |
| 245 | + - Check download statistics |
| 246 | + - Review user feedback |
| 247 | + |
| 248 | +3. **Plan next release:** |
| 249 | + - Create milestone for next version |
| 250 | + - Prioritize features/fixes |
| 251 | + - Update roadmap |
| 252 | + |
| 253 | +## Security |
| 254 | + |
| 255 | +### Code Signing (Optional) |
| 256 | + |
| 257 | +For production releases, consider code signing: |
| 258 | + |
| 259 | +**macOS:** |
| 260 | +```bash |
| 261 | +export CSC_LINK="path/to/certificate.p12" |
| 262 | +export CSC_KEY_PASSWORD="password" |
| 263 | +npm run electron:build:mac |
| 264 | +``` |
| 265 | + |
| 266 | +**Windows:** |
| 267 | +- Requires Windows code signing certificate |
| 268 | +- Configure in `electron/package.json` build section |
| 269 | + |
| 270 | +Add these as GitHub Secrets: |
| 271 | +- `CSC_LINK` - Certificate file (base64 encoded) |
| 272 | +- `CSC_KEY_PASSWORD` - Certificate password |
| 273 | +- `WIN_CSC_LINK` - Windows certificate |
| 274 | +- `WIN_CSC_KEY_PASSWORD` - Windows certificate password |
| 275 | + |
| 276 | +Update workflow to use secrets: |
| 277 | +```yaml |
| 278 | +env: |
| 279 | + CSC_LINK: ${{ secrets.CSC_LINK }} |
| 280 | + CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} |
| 281 | +``` |
| 282 | +
|
| 283 | +## Rollback |
| 284 | +
|
| 285 | +If a release has critical issues: |
| 286 | +
|
| 287 | +1. **Delete the release:** |
| 288 | + ```bash |
| 289 | + gh release delete v1.0.0 |
| 290 | + git tag -d v1.0.0 |
| 291 | + git push origin :refs/tags/v1.0.0 |
| 292 | + ``` |
| 293 | + |
| 294 | +2. **Fix issues and re-release:** |
| 295 | + ```bash |
| 296 | + # Fix code |
| 297 | + git commit -am "Fix critical issue" |
| 298 | + |
| 299 | + # Re-tag with patch version |
| 300 | + git tag v1.0.1 |
| 301 | + git push origin v1.0.1 |
| 302 | + ``` |
| 303 | + |
| 304 | +## Support |
| 305 | + |
| 306 | +For questions about the release process: |
| 307 | +- Check GitHub Actions logs |
| 308 | +- Review this documentation |
| 309 | +- Open an issue for process improvements |
0 commit comments