|
| 1 | +# Releasing Deckhand |
| 2 | + |
| 3 | +Deckhand uses a tag-driven release flow. Pushing a semver tag to `main` triggers the [release workflow](../.github/workflows/release.yml), which builds the binary, pushes a Docker image to GHCR, and creates a GitHub Release. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +- All CI checks pass on `main` (`make test`, `go vet`, TypeScript type-check, Docker build) |
| 8 | +- You have push access to the repository |
| 9 | + |
| 10 | +## Step-by-step |
| 11 | + |
| 12 | +### 1. Verify `main` is green |
| 13 | + |
| 14 | +Check the latest CI run on the [Actions tab](../../actions/workflows/ci.yml) or run locally: |
| 15 | + |
| 16 | +```bash |
| 17 | +make test |
| 18 | +go vet ./... |
| 19 | +make docker-build |
| 20 | +``` |
| 21 | + |
| 22 | +### 2. Choose a version |
| 23 | + |
| 24 | +Follow [semver](https://semver.org/): |
| 25 | + |
| 26 | +| Change | Bump | |
| 27 | +|--------|------| |
| 28 | +| Breaking API or Helm changes | major (`v2.0.0`) | |
| 29 | +| New feature, backward-compatible | minor (`v0.2.0`) | |
| 30 | +| Bug fix or docs-only | patch (`v0.1.1`) | |
| 31 | + |
| 32 | +### 3. Tag and push |
| 33 | + |
| 34 | +```bash |
| 35 | +git tag v0.1.0 |
| 36 | +git push origin v0.1.0 |
| 37 | +``` |
| 38 | + |
| 39 | +This triggers the `Release` workflow. |
| 40 | + |
| 41 | +### 4. What the workflow produces |
| 42 | + |
| 43 | +| Artifact | Location | |
| 44 | +|----------|----------| |
| 45 | +| GitHub Release | `github.com/<owner>/deckhand/releases/tag/v0.1.0` | |
| 46 | +| Release notes | Auto-generated from commits since the last tag | |
| 47 | +| `deckhand` binary | Attached to the GitHub Release | |
| 48 | +| Docker image | `ghcr.io/<owner>/deckhand:0.1.0` | |
| 49 | +| Docker image (minor) | `ghcr.io/<owner>/deckhand:0.1` | |
| 50 | +| Docker image (sha) | `ghcr.io/<owner>/deckhand:sha-<commit>` | |
| 51 | + |
| 52 | +### 5. Verify the release |
| 53 | + |
| 54 | +```bash |
| 55 | +# Check the GitHub Release page |
| 56 | +gh release view v0.1.0 |
| 57 | + |
| 58 | +# Pull and inspect the image |
| 59 | +docker pull ghcr.io/<owner>/deckhand:0.1.0 |
| 60 | +docker run --rm ghcr.io/<owner>/deckhand:0.1.0 --help |
| 61 | +``` |
| 62 | + |
| 63 | +## Fixing a bad release |
| 64 | + |
| 65 | +If a release has a critical issue: |
| 66 | + |
| 67 | +1. Delete the tag and release: |
| 68 | + |
| 69 | + ```bash |
| 70 | + git tag -d v0.1.0 |
| 71 | + git push origin :refs/tags/v0.1.0 |
| 72 | + gh release delete v0.1.0 --yes |
| 73 | + ``` |
| 74 | + |
| 75 | +2. Fix the issue on `main`. |
| 76 | + |
| 77 | +3. Re-tag with the same version or bump to a patch release, then push the tag again. |
| 78 | + |
| 79 | +## Image tagging strategy |
| 80 | + |
| 81 | +The release workflow uses [docker/metadata-action](https://github.com/docker/metadata-action) to produce three tags per release: |
| 82 | + |
| 83 | +- `{{version}}` — full semver, e.g. `0.1.0` |
| 84 | +- `{{major}}.{{minor}}` — minor track, e.g. `0.1` |
| 85 | +- `sha-{{sha}}` — commit SHA for traceability |
| 86 | + |
| 87 | +There is no `latest` tag. Users should pin to a specific version. |
0 commit comments