|
| 1 | +# Release Guide |
| 2 | + |
| 3 | +A step-by-step reference for shipping a versioned release of git-devkit. Covers the CLI package, the docs-app, and the GitHub release tag. Follow this every time you want to publish something to users. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## Overview of what a release includes |
| 8 | + |
| 9 | +git-devkit has three distinct "artifacts" that can be released independently or together: |
| 10 | + |
| 11 | +| Artifact | What it is | Where it lives | |
| 12 | +|---|---|---| |
| 13 | +| CLI package | The `git-multi-ssh` Node.js tool | Published to npm, bundled from `bin/` | |
| 14 | +| Docs app | The Angular documentation site | Deployed as static output to GitHub Pages | |
| 15 | +| Git tag + GitHub Release | The version marker on the repo | GitHub Releases page | |
| 16 | + |
| 17 | +In most cases you will release all three at once. |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## Pre-release checklist |
| 22 | + |
| 23 | +Before you increment any version number, confirm the following: |
| 24 | + |
| 25 | +- [ ] All changes on `main` are committed and pushed |
| 26 | +- [ ] `git status` shows a clean working tree |
| 27 | +- [ ] CI / local tests pass (`pnpm test` inside `docs-app/`) |
| 28 | +- [ ] The docs-app builds without errors (`pnpm run build:prod` inside `docs-app/`) |
| 29 | +- [ ] The CLI builds without errors (`npm run build` from repo root) |
| 30 | +- [ ] Any new features are documented in the relevant handbook files |
| 31 | +- [ ] `CHANGELOG.md` has an entry describing what changed |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | +## Step 1: Decide the version bump |
| 36 | + |
| 37 | +git-devkit follows [Semantic Versioning](https://semver.org): `MAJOR.MINOR.PATCH` |
| 38 | + |
| 39 | +| Change type | Which number to bump | Example | |
| 40 | +|---|---|---| |
| 41 | +| Breaking change (removes/renames functionality) | MAJOR | `0.1.0` → `1.0.0` | |
| 42 | +| New feature that is backward compatible | MINOR | `0.1.0` → `0.2.0` | |
| 43 | +| Bug fix or small internal change | PATCH | `0.1.0` → `0.1.1` | |
| 44 | + |
| 45 | +The current version is in `package.json` at the repo root. |
| 46 | + |
| 47 | +--- |
| 48 | + |
| 49 | +## Step 2: Create a release branch |
| 50 | + |
| 51 | +```bash |
| 52 | +# Start from an up-to-date main |
| 53 | +git checkout main && git pull |
| 54 | + |
| 55 | +# Create a release branch |
| 56 | +git checkout -b release/v0.2.0 |
| 57 | +``` |
| 58 | + |
| 59 | +Working on a release branch lets you prepare the version bump separately from feature work. |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +## Step 3: Bump the version |
| 64 | + |
| 65 | +Edit `package.json` at the repo root and update the `"version"` field: |
| 66 | + |
| 67 | +```json |
| 68 | +{ |
| 69 | + "version": "0.2.0" |
| 70 | +} |
| 71 | +``` |
| 72 | + |
| 73 | +Then run the CLI build to make sure it still compiles: |
| 74 | + |
| 75 | +```bash |
| 76 | +npm run build |
| 77 | +``` |
| 78 | + |
| 79 | +This runs `scripts/build.mjs` which bundles `bin/index.js` with esbuild into `dist/` and copies the updated `package.json` into `dist/`. |
| 80 | + |
| 81 | +--- |
| 82 | + |
| 83 | +## Step 4: Update CHANGELOG |
| 84 | + |
| 85 | +Open `handbook/technical/CHANGELOG.md` and add an entry at the top: |
| 86 | + |
| 87 | +``` |
| 88 | +## [0.2.0] - 2026-05-06 |
| 89 | +
|
| 90 | +### Added |
| 91 | +- Multi-SSH daily use-cases page in docs-app |
| 92 | +
|
| 93 | +### Fixed |
| 94 | +- Windows installation guide now correctly recommends native setup script |
| 95 | +
|
| 96 | +### Changed |
| 97 | +- Removed npm CLI option from installation docs (source-only distribution) |
| 98 | +``` |
| 99 | + |
| 100 | +Keep the format consistent: Added / Fixed / Changed / Removed. |
| 101 | + |
| 102 | +--- |
| 103 | + |
| 104 | +## Step 5: Build the docs-app |
| 105 | + |
| 106 | +```bash |
| 107 | +cd docs-app |
| 108 | +pnpm run build:ghpages |
| 109 | +``` |
| 110 | + |
| 111 | +The `build:ghpages` script sets `--base-href /git-devkit/` so all asset paths are correct for GitHub Pages hosting. |
| 112 | + |
| 113 | +The static output lands in `docs-app/dist/docs-app/browser/`. |
| 114 | + |
| 115 | +--- |
| 116 | + |
| 117 | +## Step 6: Commit the version bump |
| 118 | + |
| 119 | +```bash |
| 120 | +git add package.json handbook/technical/CHANGELOG.md |
| 121 | +git commit -m "chore(release): bump version to 0.2.0" |
| 122 | +``` |
| 123 | + |
| 124 | +--- |
| 125 | + |
| 126 | +## Step 7: Merge release branch to main |
| 127 | + |
| 128 | +```bash |
| 129 | +git checkout main |
| 130 | +git merge release/v0.2.0 --no-ff |
| 131 | +git push origin main |
| 132 | +``` |
| 133 | + |
| 134 | +The `--no-ff` flag keeps a merge commit so the release point is visible in the history graph. |
| 135 | + |
| 136 | +--- |
| 137 | + |
| 138 | +## Step 8: Tag the release |
| 139 | + |
| 140 | +```bash |
| 141 | +git tag -a v0.2.0 -m "Release v0.2.0" |
| 142 | +git push origin v0.2.0 |
| 143 | +``` |
| 144 | + |
| 145 | +The annotated tag (`-a`) stores a message alongside the tag, which GitHub uses as the default release notes title. |
| 146 | + |
| 147 | +--- |
| 148 | + |
| 149 | +## Step 9: Publish to GitHub Releases |
| 150 | + |
| 151 | +1. Go to `https://github.com/sahulkola/git-devkit/releases/new` |
| 152 | +2. Select the tag `v0.2.0` you just pushed |
| 153 | +3. Title: `v0.2.0 – <short description>` |
| 154 | +4. Body: paste the CHANGELOG entry for this version |
| 155 | +5. Click **Publish release** |
| 156 | + |
| 157 | +--- |
| 158 | + |
| 159 | +## Step 10: Deploy docs-app to GitHub Pages |
| 160 | + |
| 161 | +If you use the `gh-pages` branch strategy (most common for GitHub Pages): |
| 162 | + |
| 163 | +```bash |
| 164 | +# From repo root |
| 165 | +cd docs-app |
| 166 | +npx gh-pages -d dist/docs-app/browser |
| 167 | +``` |
| 168 | + |
| 169 | +If your repository is configured to deploy from the `gh-pages` branch, GitHub Pages will pick up the new files automatically within a few minutes. |
| 170 | + |
| 171 | +--- |
| 172 | + |
| 173 | +## Step 11: Delete the release branch |
| 174 | + |
| 175 | +```bash |
| 176 | +git branch -d release/v0.2.0 |
| 177 | +git push origin --delete release/v0.2.0 |
| 178 | +``` |
| 179 | + |
| 180 | +--- |
| 181 | + |
| 182 | +## Post-release sanity check |
| 183 | + |
| 184 | +- [ ] Visit `https://sahulkola.github.io/git-devkit/` and confirm the new page/content is live |
| 185 | +- [ ] The GitHub Releases page shows the new tag and notes |
| 186 | +- [ ] The version in `package.json` on `main` matches the tag |
| 187 | + |
| 188 | +--- |
| 189 | + |
| 190 | +## Hotfix releases |
| 191 | + |
| 192 | +If a critical bug surfaces after a release: |
| 193 | + |
| 194 | +```bash |
| 195 | +git checkout main |
| 196 | +git checkout -b hotfix/v0.2.1 |
| 197 | + |
| 198 | +# fix the bug |
| 199 | +# bump patch version in package.json |
| 200 | +# add CHANGELOG entry |
| 201 | + |
| 202 | +git commit -m "fix: <description>" |
| 203 | +git checkout main && git merge hotfix/v0.2.1 --no-ff |
| 204 | +git tag -a v0.2.1 -m "Hotfix v0.2.1" |
| 205 | +git push origin main --tags |
| 206 | +``` |
| 207 | + |
| 208 | +Then follow steps 9–11 above. |
| 209 | + |
| 210 | +--- |
| 211 | + |
| 212 | +## Quick reference: CLI commands summary |
| 213 | + |
| 214 | +```bash |
| 215 | +# Verify CLI builds |
| 216 | +npm run build # from repo root |
| 217 | + |
| 218 | +# Verify docs-app builds |
| 219 | +cd docs-app && pnpm run build:prod |
| 220 | + |
| 221 | +# Create and push tag |
| 222 | +git tag -a vX.Y.Z -m "Release vX.Y.Z" && git push origin vX.Y.Z |
| 223 | + |
| 224 | +# Deploy docs to GitHub Pages |
| 225 | +cd docs-app && npx gh-pages -d dist/docs-app/browser |
| 226 | +``` |
0 commit comments