|
| 1 | +# Release Notes Generation - Channel-Specific Behavior |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +The release workflow generates release notes **specific to each channel** by leveraging Release Drafter's `filter-by-commitish` feature. This ensures that: |
| 6 | + |
| 7 | +- **Stable** releases only show commits from the `stable` branch |
| 8 | +- **Beta** releases only show commits from the `dev` branch since the last beta |
| 9 | +- **Nightly** releases only show commits from the `dev` branch since the last nightly |
| 10 | + |
| 11 | +The workflow uses your **Release Drafter configuration** (`.github/release-drafter.yml`) for label-based categorization and formatting. |
| 12 | + |
| 13 | +## How It Works |
| 14 | + |
| 15 | +### 1. Filter by Branch (commitish) |
| 16 | + |
| 17 | +The `.github/release-drafter.yml` file includes: |
| 18 | + |
| 19 | +```yaml |
| 20 | +filter-by-commitish: true |
| 21 | +``` |
| 22 | +
|
| 23 | +This tells Release Drafter to only consider releases that have the same `target_commitish` (branch) when calculating the commit range. Combined with setting the `commitish` parameter to the appropriate branch: |
| 24 | + |
| 25 | +- **Stable releases**: Use `commitish: stable` → Only sees releases created from `stable` branch |
| 26 | +- **Beta releases**: Use `commitish: dev` → Only sees releases created from `dev` branch |
| 27 | +- **Nightly releases**: Use `commitish: dev` → Only sees releases created from `dev` branch |
| 28 | + |
| 29 | +### 2. Previous Release Detection |
| 30 | + |
| 31 | +The workflow also manually identifies the previous release for context headers using tag patterns: |
| 32 | + |
| 33 | +#### Stable Channel |
| 34 | +- **Pattern**: `^[0-9]+\.[0-9]+\.[0-9]+$` (e.g., `2.1.0`, `2.0.5`) |
| 35 | +- **Branch**: `stable` |
| 36 | +- **Finds**: Latest stable release (no suffix) |
| 37 | + |
| 38 | +#### Beta Channel |
| 39 | +- **Pattern**: `^[0-9]+\.[0-9]+\.[0-9]+\.b[0-9]+$` (e.g., `2.1.0.b1`, `2.1.0.b2`) |
| 40 | +- **Branch**: `dev` |
| 41 | +- **Finds**: Latest beta release (`.bN` suffix) |
| 42 | + |
| 43 | +#### Nightly Channel |
| 44 | +- **Pattern**: `^[0-9]+\.[0-9]+\.[0-9]+\.dev[0-9]+$` (e.g., `2.1.0.dev20251023`) |
| 45 | +- **Branch**: `dev` |
| 46 | +- **Finds**: Latest nightly release (`.devYYYYMMDD` suffix) |
| 47 | + |
| 48 | +### 3. Release Notes Generation |
| 49 | + |
| 50 | +Release Drafter automatically: |
| 51 | + |
| 52 | +1. **Finds commit range**: Determines commits between the previous release (same branch) and HEAD |
| 53 | +2. **Extracts PRs**: Identifies all merged pull requests in that range |
| 54 | +3. **Categorizes by labels**: Applies the category rules from `.github/release-drafter.yml`: |
| 55 | + - ⚠ Breaking Changes (`breaking-change` label) |
| 56 | + - 🚀 New Providers (`new-provider` label) |
| 57 | + - 🚀 Features and enhancements (`feature`, `enhancement`, `new-feature` labels) |
| 58 | + - 🐛 Bugfixes (`bugfix` label) |
| 59 | + - 🧰 Maintenance (`ci`, `documentation`, `maintenance`, `dependencies` labels) |
| 60 | +4. **Lists contributors**: Adds all unique contributors from the PRs |
| 61 | + |
| 62 | +The workflow then enhances these notes by: |
| 63 | +- Adding a context header showing the previous release |
| 64 | +- Extracting and appending frontend changes from frontend update PRs |
| 65 | +- Merging and deduplicating contributors from both server and frontend |
| 66 | + |
| 67 | +### 4. What This Means |
| 68 | + |
| 69 | +#### ✅ Stable Release Notes |
| 70 | +- Include **only commits since the last stable release** |
| 71 | +- **Do NOT include** beta or nightly commits that happened in between |
| 72 | +- Example: `2.0.5` → `2.1.0` only shows stable branch commits |
| 73 | + |
| 74 | +#### ✅ Beta Release Notes |
| 75 | +- Include **only commits since the last beta release** |
| 76 | +- **Do NOT include** nightly commits |
| 77 | +- **Do NOT include** stable commits from stable branch |
| 78 | +- Example: `2.1.0.b2` → `2.1.0.b3` only shows dev branch commits since b2 |
| 79 | + |
| 80 | +#### ✅ Nightly Release Notes |
| 81 | +- Include **only commits since the last nightly release** |
| 82 | +- **Do NOT include** beta or stable releases in between |
| 83 | +- Example: `2.1.0.dev20251022` → `2.1.0.dev20251023` only shows dev branch commits since yesterday |
| 84 | + |
| 85 | +## Release Drafter Configuration |
| 86 | + |
| 87 | +✅ The workflow **uses Release Drafter natively** with the following key configuration: |
| 88 | + |
| 89 | +```yaml |
| 90 | +# .github/release-drafter.yml |
| 91 | +filter-by-commitish: true # Only consider releases from the same branch |
| 92 | +``` |
| 93 | + |
| 94 | +This configuration, combined with setting the appropriate `commitish` parameter when calling Release Drafter, ensures: |
| 95 | +- **No temporary hiding of releases** (avoids updating publish dates) |
| 96 | +- **Native Release Drafter filtering** (robust and reliable) |
| 97 | +- **Branch-based separation** (stable vs dev commits are naturally separated) |
| 98 | + |
| 99 | +The workflow also uses your existing configuration for: |
| 100 | +- Category definitions (labels → section headers) |
| 101 | +- Category titles and emoji |
| 102 | +- Excluded contributors (bots) |
| 103 | +- PR title format |
| 104 | + |
| 105 | +## Example Release Notes Format |
| 106 | + |
| 107 | +```markdown |
| 108 | +## 📦 Beta Release |
| 109 | +
|
| 110 | +_Changes since [2.1.0.b1](https://github.com/music-assistant/server/releases/tag/2.1.0.b1)_ |
| 111 | +
|
| 112 | +### ⚠ Breaking Changes |
| 113 | +
|
| 114 | +- Major API refactoring (by @contributor1 in #123) |
| 115 | +
|
| 116 | +### 🚀 Features and enhancements |
| 117 | +
|
| 118 | +- Add new audio processor (by @contributor2 in #124) |
| 119 | +- Improve queue management (by @contributor3 in #125) |
| 120 | +
|
| 121 | +### 🐛 Bugfixes |
| 122 | +
|
| 123 | +- Fix playback issue (by @contributor1 in #126) |
| 124 | +
|
| 125 | +### 🧰 Maintenance and dependency bumps |
| 126 | +
|
| 127 | +- Update dependencies (by @dependabot in #127) |
| 128 | +- Improve CI pipeline (by @contributor2 in #128) |
| 129 | +
|
| 130 | +## :bow: Thanks to our contributors |
| 131 | +
|
| 132 | +Special thanks to the following contributors who helped with this release: |
| 133 | +
|
| 134 | +@contributor1, @contributor2, @contributor3 |
| 135 | +``` |
| 136 | + |
| 137 | +## Testing |
| 138 | + |
| 139 | +To verify channel-specific release notes: |
| 140 | + |
| 141 | +1. **Create a beta release** after a stable release: |
| 142 | + ```bash |
| 143 | + # Should only show commits on dev branch since last beta |
| 144 | + # Should NOT include stable branch commits |
| 145 | + ``` |
| 146 | + |
| 147 | +2. **Create a nightly release** after a beta release: |
| 148 | + ```bash |
| 149 | + # Should only show commits since yesterday's nightly |
| 150 | + # Should NOT include beta release notes |
| 151 | + ``` |
| 152 | + |
| 153 | +3. **Create a stable release** after multiple betas: |
| 154 | + ```bash |
| 155 | + # Should only show commits on stable branch since last stable |
| 156 | + # Should NOT include any beta or nightly commits |
| 157 | + ``` |
| 158 | + |
| 159 | +## Verification Commands |
| 160 | + |
| 161 | +```bash |
| 162 | +# Check what will be in next stable release |
| 163 | +git log $(git tag | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -1)..stable --oneline |
| 164 | +
|
| 165 | +# Check what will be in next beta release |
| 166 | +git log $(git tag | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.b[0-9]+$' | sort -V | tail -1)..dev --oneline |
| 167 | +
|
| 168 | +# Check what will be in next nightly release |
| 169 | +git log $(git tag | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.dev[0-9]+$' | sort -V | tail -1)..dev --oneline |
| 170 | +``` |
| 171 | + |
| 172 | +## Testing |
| 173 | + |
| 174 | +To verify channel-specific release notes: |
| 175 | + |
| 176 | +1. **Create a beta release** after a stable release: |
| 177 | + ```bash |
| 178 | + # Should only show commits on dev branch since last beta |
| 179 | + # Should NOT include stable branch commits |
| 180 | + ``` |
| 181 | + |
| 182 | +2. **Create a nightly release** after a beta release: |
| 183 | + ```bash |
| 184 | + # Should only show commits since yesterday's nightly |
| 185 | + # Should NOT include beta release notes |
| 186 | + ``` |
| 187 | + |
| 188 | +3. **Create a stable release** after multiple betas: |
| 189 | + ```bash |
| 190 | + # Should only show commits on stable branch since last stable |
| 191 | + # Should NOT include any beta or nightly commits |
| 192 | + ``` |
| 193 | + |
| 194 | +## Verification Commands |
| 195 | + |
| 196 | +```bash |
| 197 | +# Check what will be in next stable release |
| 198 | +git log $(git tag | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -1)..stable --oneline |
| 199 | +
|
| 200 | +# Check what will be in next beta release |
| 201 | +git log $(git tag | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.b[0-9]+$' | sort -V | tail -1)..dev --oneline |
| 202 | +
|
| 203 | +# Check what will be in next nightly release |
| 204 | +git log $(git tag | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.dev[0-9]+$' | sort -V | tail -1)..dev --oneline |
| 205 | +``` |
0 commit comments