|
| 1 | +# Releasing linkdqueue |
| 2 | + |
| 3 | +This document describes how to create a new release of linkdqueue using the automated GitHub Actions release workflow. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +The release workflow (`.github/workflows/release.yml`) is triggered automatically whenever a Git tag matching the pattern `v*.*.*` is pushed to the repository. It builds the application for macOS, Linux, and Windows in parallel, then creates a GitHub Release with all three platform archives attached and auto-generated release notes. |
| 8 | + |
| 9 | +## Prerequisites |
| 10 | + |
| 11 | +- Write access to the `feoh/linkdqueue` repository |
| 12 | +- [Git](https://git-scm.com/) installed locally |
| 13 | +- The `main` (or release) branch in a clean, releasable state |
| 14 | + |
| 15 | +## Steps to Create a Release |
| 16 | + |
| 17 | +### 1. Update the Version Number |
| 18 | + |
| 19 | +Edit `pubspec.yaml` and increment the `version` field. The format is `MAJOR.MINOR.PATCH+BUILD` (e.g. `1.2.0+2`). |
| 20 | + |
| 21 | +```yaml |
| 22 | +version: 1.2.0+2 |
| 23 | +``` |
| 24 | +
|
| 25 | +Commit and push this change to the repository before tagging: |
| 26 | +
|
| 27 | +```bash |
| 28 | +git add pubspec.yaml |
| 29 | +git commit -m "Bump version to 1.2.0" |
| 30 | +git push |
| 31 | +``` |
| 32 | + |
| 33 | +### 2. Create and Push a Version Tag |
| 34 | + |
| 35 | +Tags must follow the `v<MAJOR>.<MINOR>.<PATCH>` format (e.g. `v1.2.0`). This is what triggers the release workflow. |
| 36 | + |
| 37 | +```bash |
| 38 | +git tag v1.2.0 |
| 39 | +git push origin v1.2.0 |
| 40 | +``` |
| 41 | + |
| 42 | +> **Important:** The tag version should match the version you set in `pubspec.yaml`. |
| 43 | +
|
| 44 | +### 3. Monitor the Workflow |
| 45 | + |
| 46 | +After pushing the tag: |
| 47 | + |
| 48 | +1. Go to the repository on GitHub: <https://github.com/feoh/linkdqueue> |
| 49 | +2. Click the **Actions** tab. |
| 50 | +3. You will see a workflow run named **Release** triggered by the new tag. |
| 51 | + |
| 52 | +The workflow runs four jobs: |
| 53 | + |
| 54 | +| Job | Runner | Output | |
| 55 | +|---|---|---| |
| 56 | +| `build-macos` | `macos-latest` | `linkdqueue-macos.zip` | |
| 57 | +| `build-linux` | `ubuntu-latest` | `linkdqueue-linux.tar.gz` | |
| 58 | +| `build-windows` | `windows-latest` | `linkdqueue-windows.zip` | |
| 59 | +| `release` | `ubuntu-latest` | GitHub Release with all three archives | |
| 60 | + |
| 61 | +The three build jobs run in parallel. The `release` job waits for all of them to succeed before publishing. |
| 62 | + |
| 63 | +### 4. Verify the Release |
| 64 | + |
| 65 | +Once the workflow completes successfully: |
| 66 | + |
| 67 | +1. Go to the **Releases** section of the repository. |
| 68 | +2. Confirm the new release is listed with the correct tag name. |
| 69 | +3. Verify that the following assets are attached: |
| 70 | + - `linkdqueue-macos.zip` — macOS `.app` bundle (universal) |
| 71 | + - `linkdqueue-linux.tar.gz` — Linux x64 bundle |
| 72 | + - `linkdqueue-windows.zip` — Windows x64 bundle |
| 73 | +4. Review the auto-generated release notes and edit them on GitHub if needed. |
| 74 | + |
| 75 | +## Troubleshooting |
| 76 | + |
| 77 | +### Workflow did not start |
| 78 | + |
| 79 | +- Confirm the tag matches the `v*.*.*` pattern exactly (e.g. `v1.2.0`, not `1.2.0` or `release-1.2.0`). |
| 80 | +- Confirm the tag was pushed to the remote (`git push origin <tag>`). |
| 81 | + |
| 82 | +### A build job failed |
| 83 | + |
| 84 | +- Click the failed job in the Actions tab to see the full log. |
| 85 | +- Common causes: a dependency version mismatch or a Flutter API change. Update `pubspec.yaml` or the Flutter version pin in the workflow file accordingly. |
| 86 | +- After fixing the issue, delete the tag locally and remotely, then re-create it: |
| 87 | + |
| 88 | +```bash |
| 89 | +git tag -d v1.2.0 |
| 90 | +git push origin :refs/tags/v1.2.0 |
| 91 | +# fix the problem, commit, then re-tag |
| 92 | +git tag v1.2.0 |
| 93 | +git push origin v1.2.0 |
| 94 | +``` |
| 95 | + |
| 96 | +### Release was not created |
| 97 | + |
| 98 | +- Confirm the `release` job ran and check its logs. |
| 99 | +- The workflow requires `contents: write` permission. If this was changed, restore it in `.github/workflows/release.yml`. |
0 commit comments