|
| 1 | +# CI/CD Guide |
| 2 | + |
| 3 | +## How it works |
| 4 | + |
| 5 | +Two GitHub Actions workflows handle builds and releases automatically. |
| 6 | + |
| 7 | +### Build workflow (`build.yml`) |
| 8 | + |
| 9 | +- **Trigger**: Every push to `main` |
| 10 | +- **What it does**: Builds for Windows, Linux, macOS (both Intel + Apple Silicon) |
| 11 | +- **Where**: Artifacts appear on the Actions tab β click a run β scroll down to "Artifacts" |
| 12 | +- **Artifacts expire after 30 days** |
| 13 | + |
| 14 | +### Release workflow (`release.yml`) |
| 15 | + |
| 16 | +- **Trigger**: Push a `v*` tag (e.g. `v0.1.0`, `v1.2.3`) |
| 17 | +- **What it does**: Builds + creates a **draft** GitHub Release |
| 18 | +- **Draft means**: It's not public until YOU review and publish it |
| 19 | + |
| 20 | +## Creating a release |
| 21 | + |
| 22 | +### 1. Bump the version |
| 23 | + |
| 24 | +Edit `src-tauri/tauri.conf.json` and update the version: |
| 25 | + |
| 26 | +```json |
| 27 | +{ |
| 28 | + "version": "0.2.0" |
| 29 | +} |
| 30 | +``` |
| 31 | + |
| 32 | +Also update `package.json` if you want them to match: |
| 33 | + |
| 34 | +```json |
| 35 | +{ |
| 36 | + "version": "0.2.0" |
| 37 | +} |
| 38 | +``` |
| 39 | + |
| 40 | +### 2. Commit and push |
| 41 | + |
| 42 | +```sh |
| 43 | +git add . |
| 44 | +git commit -m "bump version to 0.2.0" |
| 45 | +git push |
| 46 | +``` |
| 47 | + |
| 48 | +### 3. Tag and push the tag |
| 49 | + |
| 50 | +```sh |
| 51 | +git tag v0.2.0 |
| 52 | +git push origin v0.2.0 |
| 53 | +``` |
| 54 | + |
| 55 | +### 4. Wait for the build |
| 56 | + |
| 57 | +Go to your repo β **Actions** tab β watch the release workflow run. |
| 58 | + |
| 59 | +### 5. Review and publish |
| 60 | + |
| 61 | +Go to **Releases** β you'll see a draft release with auto-generated release notes. |
| 62 | + |
| 63 | +- Review the notes (edit if needed) |
| 64 | +- Attach any extra files if you want |
| 65 | +- Click **Publish release** |
| 66 | + |
| 67 | +That's it. |
| 68 | + |
| 69 | +## Getting artifacts from main builds |
| 70 | + |
| 71 | +1. Go to your repo β **Actions** tab |
| 72 | +2. Click the latest successful "Build" run |
| 73 | +3. Scroll down to **Artifacts** |
| 74 | +4. Download the platform you need |
| 75 | + |
| 76 | +## Labels for release notes |
| 77 | + |
| 78 | +The `.github/release.yml` file controls how release notes are auto-generated. |
| 79 | +Use these labels on PRs to categorize them: |
| 80 | + |
| 81 | +| Label | Category | |
| 82 | +|-------|----------| |
| 83 | +| `feature`, `enhancement` | Features | |
| 84 | +| `bug`, `bugfix`, `fix` | Bug Fixes | |
| 85 | +| `breaking-change` | Breaking Changes | |
| 86 | +| `improvement`, `refactor`, `performance` | Improvements | |
| 87 | +| `dependencies` | Dependencies | |
| 88 | + |
| 89 | +PRs without a label go into "Other Changes". |
| 90 | + |
| 91 | +## Useful commands |
| 92 | + |
| 93 | +```sh |
| 94 | +# See current tags |
| 95 | +git tag |
| 96 | + |
| 97 | +# Delete a local tag (if you made a mistake) |
| 98 | +git tag -d v0.2.0 |
| 99 | + |
| 100 | +# Delete a remote tag |
| 101 | +git push origin --delete v0.2.0 |
| 102 | + |
| 103 | +# Check what version is set |
| 104 | +cat src-tauri/tauri.conf.json | grep version |
| 105 | +``` |
0 commit comments