Skip to content

Commit 494a5cc

Browse files
committed
docs: add release guide and link from README/CONTRIBUTING
New docs/releasing.md covers the tag-driven release flow: step-by-step tagging, what the workflow produces, image tagging strategy, and how to fix a bad release.
1 parent 854f379 commit 494a5cc

3 files changed

Lines changed: 99 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,17 @@ Then run any workflow-specific checks that match your change, such as:
100100
- a local UI smoke test when changing routed pages, browser state, or embedded assets
101101
- API-specific checks when editing handlers or DTOs under `internal/api/`
102102

103+
## Releasing
104+
105+
See [docs/releasing.md](docs/releasing.md) for the full release guide. The short version:
106+
107+
```bash
108+
git tag v0.1.0
109+
git push origin v0.1.0
110+
```
111+
112+
The [release workflow](.github/workflows/release.yml) builds the binary, pushes a Docker image to GHCR, and creates a GitHub Release with auto-generated notes.
113+
103114
## Pull request guidance
104115

105116
Please keep PRs grounded in the repository’s current contracts:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ Need request/response examples or RBAC details? Jump straight to the published r
123123
- [Architecture overview](docs/architecture.md)
124124
- [API reference](docs/api.md)
125125
- [Permissions and RBAC](docs/permissions.md)
126+
- [Releasing](docs/releasing.md)
126127
- [Contributing guide](CONTRIBUTING.md)
127128
- [Helm chart README](charts/deckhand/README.md)
128129

docs/releasing.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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

Comments
 (0)