Skip to content

Commit 957bd88

Browse files
authored
[Documentation] Document the release process in CLAUDE.md (#437)
* [Documentation] Add release process checklist to CLAUDE.md * [Documentation] Generalize gem owner check, drop hardcoded username * [Documentation] Add X.com announcement share link as final release step * [Documentation] Use full X.Y.Z in release announcement so patches get posted
1 parent 957f4fc commit 957bd88

1 file changed

Lines changed: 35 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,39 @@ bundle exec standardrb
4848
- Stimulus controllers colocated with components: `<component>_controller.js`. JS deps declared in `gem/package.json` and per-component in `dependencies.yml`.
4949
- Tests extend `ComponentTest`; render via `phlex { ... }` helper.
5050

51+
## Releasing
52+
53+
A release is **not done** until all four steps below are complete. Skipping the publish, the docs/website reflection, or the git tag leaves the release half-finished.
54+
55+
Decide the bump with SemVer against commits since the last `vX.Y.Z` tag: new backward-compatible features → **minor**; bug fixes / docs only → **patch**. List the range with `git log --oneline vX.Y.Z..HEAD`.
56+
57+
1. **Bump the version (gem).** Edit `RubyUI::VERSION` in `gem/lib/ruby_ui.rb`. Then from each app dir regenerate lockfiles so the path dependency tracks the new version: `gem/Gemfile.lock` and `docs/Gemfile.lock` should both read `ruby_ui (X.Y.Z)`.
58+
59+
2. **Publish the gem to RubyGems.** From `gem/`: `gem build ruby_ui.gemspec` then `gem push ruby_ui-X.Y.Z.gem`. The account has **MFA**, so `gem push` prompts for a one-time password — have the OTP ready (or pass `--otp <CODE>`). Confirm the publishing account is listed in `gem owner ruby_ui` first. Do not commit the built `.gem` artifact.
60+
61+
3. **Reflect the version on the docs website (PR against `main`).** Releases go through a `[Release] vX.Y.Z` PR (main is protected — no direct pushes). The PR bundles, on a `release/vX.Y.Z` branch:
62+
- the `gem/lib/ruby_ui.rb` bump + both regenerated `Gemfile.lock`s;
63+
- `docs/app/views/pages/home.rb` — update the home hero badge copy to the headline features (the header version badge reads `RubyUI::VERSION` and updates automatically; do not hardcode it);
64+
- `mcp/data/registry.json` — rebuild with `cd mcp && bundle exec rake mcp:build` (reads `../gem`, so it picks up the new version).
65+
66+
4. **Tag + GitHub release.** After the release PR merges, tag `vX.Y.Z` on the merge commit, push the tag, and cut the GitHub release. The git tag and the published gem must both exist — publishing the gem without tagging (or vice versa) is an incomplete release.
67+
68+
5. **Hand over the announcement URL (final step).** As the last step, give the user a ready-to-post X.com (Twitter) share link for the RubyUI account — the user posts it manually. Use the prefilled-tweet intent URL with the body URL-encoded:
69+
70+
```
71+
https://x.com/intent/post?text=RubyUI%20X.Y.Z%20released%21%20%F0%9F%9A%80%0A%0Ahttps%3A%2F%2Fwww.rubyui.com%2Fdocs%2Fchangelog
72+
```
73+
74+
which decodes to:
75+
76+
```
77+
RubyUI X.Y.Z released! 🚀
78+
79+
https://www.rubyui.com/docs/changelog
80+
```
81+
82+
Substitute the real full `X.Y.Z` (e.g. `1.4.0`) in the encoded `text` — always include all three numbers so patch releases get announced too. Output the link so the user can open and post it.
83+
5184
## Commits & PRs
5285

5386
- Bracketed prefixes (`[Feature]`, `[Bug Fix]`, `[Documentation]`) or scoped conventional (`feat(scope): ...`).
@@ -58,5 +91,6 @@ bundle exec standardrb
5891

5992
- Don't run commands from repo root expecting them to work — `cd gem` or `cd docs` first.
6093
- Don't edit a component without updating its `docs/app/views/docs/<component>.rb` counterpart.
61-
- Don't bump the gem version or release from `docs/`; releases happen in `gem/`.
94+
- Don't bump the gem version from `docs/`; `RubyUI::VERSION` lives in `gem/lib/ruby_ui.rb` and the gem is published from `gem/`. (The release PR also reflects the version into `docs/` and `mcp/` — see [Releasing](#releasing).)
95+
- Don't call a release done after only publishing the gem — tag `vX.Y.Z` and reflect the version on the website too.
6296
- Don't commit secrets; each app uses local env config.

0 commit comments

Comments
 (0)