|
2 | 2 |
|
3 | 3 | ## Overview |
4 | 4 |
|
5 | | -Releases are automated via GitHub Actions. When you push a tag starting with `v` (e.g., `v0.1.0`), the release workflow builds and publishes distributables for macOS, Windows, and Linux. |
| 5 | +Releases follow Git Flow and are fully automated via GitHub Actions. |
| 6 | + |
| 7 | +## Flow |
| 8 | + |
| 9 | +``` |
| 10 | +develop → release/X.Y.Z branch → PR to main → merge |
| 11 | + ↓ auto-tag.yml triggers: |
| 12 | + 1. Creates git tag vX.Y.Z from package.json version |
| 13 | + 2. Merges main → develop (keeps branches aligned) |
| 14 | + ↓ release.yml triggers (on tag push): |
| 15 | + 3. Builds distributables (macOS, Windows, Linux) |
| 16 | + 4. Creates draft GitHub Release with artifacts |
| 17 | + 5. Posts tweet announcement |
| 18 | +``` |
6 | 19 |
|
7 | 20 | ## Creating a Release |
8 | 21 |
|
9 | 22 | ```bash |
10 | | -# 1. Update version in apps/desktop/package.json |
11 | | -# 2. Commit the change |
12 | | -git add apps/desktop/package.json |
13 | | -git commit -m "chore: bump version to 0.1.0" |
14 | | - |
15 | | -# 3. Create and push the tag |
16 | | -git tag v0.1.0 |
17 | | -git push origin main --tags |
| 23 | +# 1. Create release branch from develop |
| 24 | +git checkout develop |
| 25 | +git pull origin develop |
| 26 | +git checkout -b release/0.9.0 |
| 27 | + |
| 28 | +# 2. Bump version in root package.json + apps/desktop/package.json |
| 29 | +# 3. Update CHANGELOG.md |
| 30 | +# 4. Commit and push |
| 31 | +git add -A |
| 32 | +git commit -m "chore(release): bump version to 0.9.0" |
| 33 | +git push -u origin release/0.9.0 |
| 34 | + |
| 35 | +# 5. Create PR targeting main |
| 36 | +gh pr create --base main --title "chore(release): v0.9.0" --body "Release 0.9.0" |
| 37 | + |
| 38 | +# 6. Once CI passes and PR merges → tag + release + sync happen automatically |
18 | 39 | ``` |
19 | 40 |
|
20 | | -The workflow will: |
| 41 | +The release workflow will: |
| 42 | + |
| 43 | +1. Validate tag matches `package.json` version |
| 44 | +2. Build packages for all platforms (macOS, Windows, Linux) |
| 45 | +3. Sign and notarize the macOS build (if secrets are configured) |
| 46 | +4. Create a draft GitHub Release with all artifacts |
| 47 | +5. Post tweet announcement |
| 48 | + |
| 49 | +## Versioning |
| 50 | + |
| 51 | +- **Format:** SemVer with `v` prefix — `v0.9.0`, `v0.9.1`, `v1.0.0` |
| 52 | +- **Tags are created ONLY by GitHub Actions** (auto-tag.yml) |
| 53 | +- **No manual tags** — the automation reads version from `package.json` |
| 54 | + |
| 55 | +## Tag Protection Rules (GitHub Settings) |
| 56 | + |
| 57 | +Configure in **Repository Settings > Rules > Tag protection rules**: |
| 58 | + |
| 59 | +| Setting | Value | |
| 60 | +| ----------------- | --------------------------------- | |
| 61 | +| Tag name pattern | `v*` | |
| 62 | +| Restrict creation | Enabled | |
| 63 | +| Allowed to create | GitHub Actions, Repository admins | |
| 64 | +| Force push | Disabled | |
| 65 | + |
| 66 | +This prevents: |
21 | 67 |
|
22 | | -1. Build packages for all platforms |
23 | | -2. Sign and notarize the macOS build (if secrets are configured) |
24 | | -3. Create a draft GitHub release with all artifacts |
| 68 | +- Manual tags outside the release flow |
| 69 | +- Force-pushing tags (rewriting release history) |
| 70 | +- Tags that don't follow SemVer |
25 | 71 |
|
26 | 72 | ## Required Secrets |
27 | 73 |
|
|
0 commit comments