Skip to content

Commit bb43d6c

Browse files
committed
Add .agents release
1 parent 7cdb07b commit bb43d6c

1 file changed

Lines changed: 105 additions & 0 deletions

File tree

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
name: moqx-release
3+
description: Cut a moqx release — bump version, update CHANGELOG, commit, tag, push. CI handles Hex publish and GitHub release automatically.
4+
argument-hint: [version]
5+
---
6+
7+
# moqx Release
8+
9+
Releases are tag-driven. Pushing an annotated `vX.Y.Z` tag triggers
10+
`.github/workflows/release.yml`, which runs preflight checks, publishes to
11+
Hex.pm (`mix hex.publish --yes` via `HEX_API_KEY` secret), and creates the
12+
GitHub release. **No manual `mix hex.publish` needed.**
13+
14+
## Steps
15+
16+
### 1. Preflight
17+
18+
```bash
19+
git status --short --branch # must be clean, on main
20+
mix format --check-formatted
21+
mix test
22+
MOQX_RELAY_CACERTFILE=.tmp/integration-certs/ca.pem mix test.integration
23+
mix docs
24+
mix credo --strict
25+
```
26+
27+
If the relay container is not running, start it first:
28+
29+
```bash
30+
scripts/generate_integration_certs.sh .tmp/integration-certs
31+
docker compose -f docker-compose.integration.yml up -d relay
32+
```
33+
34+
If integration tests fail with TLS errors (`BadSignature`, `UnknownIssuer`),
35+
recreate the relay container — it may have stale certs:
36+
37+
```bash
38+
docker compose -f docker-compose.integration.yml down --remove-orphans
39+
docker compose -f docker-compose.integration.yml up -d relay
40+
```
41+
42+
### 2. Decide the version
43+
44+
| Signal | Version bump |
45+
|:---|:---|
46+
| Breaking change in public API or message shapes | **minor** (0.X.0) |
47+
| New non-breaking features | **minor** (0.X.0) while pre-1.0 |
48+
| Bug fixes / docs only | **patch** (0.0.X) |
49+
50+
Current version is in `mix.exs`. Confirm the `[Unreleased]` section of
51+
`CHANGELOG.md` to understand what's shipping.
52+
53+
### 3. Update files
54+
55+
**`CHANGELOG.md`** — rename `## [Unreleased]` to `## [X.Y.Z] - YYYY-MM-DD`
56+
and add a fresh `## [Unreleased]` above it.
57+
58+
**`mix.exs`** — bump `version:`.
59+
60+
**`README.md`** — update the install snippet (`{:moqx, "~> X.Y.Z"}`).
61+
62+
### 4. Commit, tag, push
63+
64+
```bash
65+
git add CHANGELOG.md mix.exs README.md
66+
git commit -m "release: vX.Y.Z"
67+
git push
68+
69+
git tag -a vX.Y.Z -m "vX.Y.Z"
70+
git push origin vX.Y.Z
71+
```
72+
73+
The tag push is the only trigger CI needs. Monitor the run:
74+
75+
```bash
76+
gh run list --workflow=release.yml --limit 3
77+
gh run watch # stream the active run
78+
```
79+
80+
### 5. Verify
81+
82+
Once CI is green:
83+
84+
```bash
85+
mix hex.info moqx # confirm new version appears
86+
gh release view vX.Y.Z
87+
```
88+
89+
## What CI does (do not do these manually)
90+
91+
- Validates tag == `mix.exs` version == `CHANGELOG.md` section heading
92+
- Runs `mix format --check-formatted`, unit tests, relay-backed integration tests, `mix docs`, `mix credo --strict`
93+
- `mix hex.publish --yes` (publishes package + docs)
94+
- Creates/updates the GitHub release with notes extracted from `CHANGELOG.md`
95+
96+
## Quick checklist
97+
98+
- [ ] Working tree clean, on `main`
99+
- [ ] Preflight passes locally
100+
- [ ] `CHANGELOG.md` updated (versioned section + fresh `[Unreleased]`)
101+
- [ ] `mix.exs` version bumped
102+
- [ ] `README.md` install snippet updated
103+
- [ ] Commit pushed
104+
- [ ] Annotated tag created and pushed
105+
- [ ] CI release workflow green

0 commit comments

Comments
 (0)