Diffinery

homeflare/diffinerypublic

Open-source, agent-first GitHub and GitHub Actions alternative that runs on your own Cloudflare account: git hosting, pull requests, code review and drop-in GitHub Actions YAML on Workers, Durable Objects, R2 and Containers.

diffinery/docs/RELEASING.md
219 lines · 9.1 KBRaw History
1# Releasing Diffinery
2
3This is the playbook for cutting a Diffinery release. Follow it step by step, whether you
4are a maintainer or an AI agent preparing the release for one.
5
6Diffinery is deployed continuously: every merge to `main` that passes CI deploys
7diffinery.com. A release doesn't deploy anything. It names a point on `main` that
8self-hosters can deploy, with a changelog, a tag and a GitHub release.
9
10## What a release contains
11
12- A `## [X.Y.Z] - YYYY-MM-DD` section in [CHANGELOG.md](../CHANGELOG.md).
13- The new version in every file listed in [Bump the version](#4-bump-the-version).
14- Docs, README, ROADMAP and CITATION brought up to date with what shipped.
15- A tag `vX.Y.Z` on `main` and a GitHub release at
16 https://github.com/codician-team/diffinery/releases with the release notes.
17
18The editor extensions (`apps/vscode`, `apps/jetbrains`) and the plugins (`plugins/`) have
19versions of their own. They are released when they change, not with every Diffinery
20release. See [Extensions and plugins](#extensions-and-plugins).
21
22## Who does what
23
24- **An agent or a contributor** prepares the release pull request: steps 1 to 7.
25- **A maintainer** (write access on `codician-team/diffinery`) merges it and publishes the
26 tag and the GitHub release: steps 8 and 9.
27
28Agents: never create a tag or a GitHub release, and never push to `main`, without a
29maintainer's go-ahead in the conversation for that release.
30
31## Choosing the version
32
33Diffinery is at `0.y.z`, so:
34
35- **Minor** (`0.2.0` → `0.3.0`): new features, new settings, new D1 migrations, or anything a
36 self-hoster must act on (a new secret, a renamed setting, a changed default).
37- **Patch** (`0.2.0` → `0.2.1`): fixes and docs only, no migrations and no new settings.
38
39Once Diffinery reaches `1.0.0`, a change that breaks an existing instance, API client or
40workflow needs a major version.
41
42## 1. Find what changed
43
44Start from an up-to-date `main`:
45
46```sh
47git fetch origin --tags
48PREV=$(git describe --tags --abbrev=0 origin/main) # the last release, such as v0.1.0
49git log --no-merges --format='%h %s' "$PREV"..origin/main
50```
51
52Then look for what self-hosters must know:
53
54```sh
55git diff --name-only "$PREV"..origin/main -- apps/diffinery/migrations # new D1 migrations
56git diff "$PREV"..origin/main -- apps/diffinery/src/env.ts apps/diffinery/wrangler.jsonc # new settings and bindings
57git diff --stat "$PREV"..origin/main -- apps/diffinery/docs # docs that already changed
58```
59
60Leave out changes that only touch tests, CI of this repository or internal scripts, unless
61they change how people deploy or contribute.
62
63## 2. Branch
64
65```sh
66git switch -c release/vX.Y.Z origin/main
67```
68
69## 3. Write the changelog
70
71In [CHANGELOG.md](../CHANGELOG.md):
72
731. Add `## [X.Y.Z] - YYYY-MM-DD` (today's date, UTC) below `## [Unreleased]`, and move
74 anything under `[Unreleased]` into it. Keep `## [Unreleased]` empty above it.
752. Open with one or two sentences on what the release is about.
763. Group entries under the headings the earlier releases use: **Actions (CI/CD)**, **Git
77 hosting and collaboration**, **AI agents and integrations**, **Self-hosting**, and
78 **Changed**, **Removed** or **Security** when there are such entries. Leave out empty
79 groups.
804. Write each entry for the person who uses or runs Diffinery: what they can do now, with
81 the exact names of buttons, settings, endpoints and flags. One line per change, not one
82 per commit.
835. Under **Self-hosting**, name every new setting, secret and binding, and say if the
84 update needs anything beyond running Deploy or `scripts/setup.sh`.
856. Update the links at the bottom:
86
87 ```
88 [Unreleased]: https://github.com/codician-team/diffinery/compare/vX.Y.Z...HEAD
89 [X.Y.Z]: https://github.com/codician-team/diffinery/compare/vPREV...vX.Y.Z
90 ```
91
92## 4. Bump the version
93
94The Worker, the CLI, the runner and the packages share one version. Change it in:
95
96| File | What |
97| --- | --- |
98| `apps/diffinery/package.json` | `"version"` |
99| `apps/cli/package.json` | `"version"` |
100| `apps/cli/src/version.ts` | `VERSION`, which `diffinery --version` prints and the docs show |
101| `containers/runner/package.json` | `"version"` |
102| `packages/git-core/package.json`, `packages/shared/package.json`, `packages/workflow-yaml/package.json` | `"version"` |
103| `apps/diffinery/src/mcp/server.ts` | `serverInfo.version` of the MCP server |
104| `apps/diffinery/docs/agents/mcp.md` | the two `serverInfo` examples |
105| `CITATION.cff` | `version` and `date-released` |
106
107Then check that nothing still names the old version, apart from the changelog, tests and
108examples:
109
110```sh
111git grep -n "OLD.VERSION" -- ':!pnpm-lock.yaml' ':!CHANGELOG.md'
112```
113
114## 5. Update the docs and the README
115
116Features ship with their docs (see [AGENTS.md](../AGENTS.md)), so most pages are already
117current. Check the rest:
118
119- **Docs** in `apps/diffinery/docs`: every user- or admin-visible change from step 1 has a
120 page that describes it. Fix any that doesn't. Differences from GitHub go in
121 `actions/compatibility.md`. The version example in `self-hosting/deploy.md` under
122 **Updating** names the new tag.
123- **README.md**: the sections *Who Diffinery is for*, *Why Diffinery*, *Plugins and
124 integrations*, *Features*, *Self-host on your own Cloudflare account*, *How it runs on
125 Cloudflare*, *What Diffinery doesn't do (yet)* and *FAQ*. Add what's new, remove gaps that
126 are closed, and update numbers such as the count of MCP tools and the `git checkout`
127 tag in *Self-host*.
128- **ROADMAP.md**: move anything that now works from *Known gaps* to *Works today*.
129- **Product pages** in `apps/diffinery/site` (`features.md`, `faq.md`, `compare/*.md`) for
130 anything the README changed.
131- **CITATION.cff**: the `abstract` if what Diffinery is has changed.
132
133Keep the style: short sentences, exact names, no marketing words.
134
135## 6. Check
136
137```sh
138pnpm install
139pnpm -r build
140pnpm -r typecheck
141pnpm -r test
142```
143
144All four must pass. Never skip or disable a test to get green.
145
146## 7. Open the pull request
147
148Commit everything in one commit and open one pull request against `main` on GitHub:
149
150- Title: `Release vX.Y.Z`.
151- Description: the changelog section, the version, and the person you work for.
152
153## 8. Merge and wait for the deploy
154
155A maintainer squash-merges the pull request. Wait until **CI** and **Deploy** on `main`
156are green for the merge commit, so the tag points at a commit that is live on
157diffinery.com.
158
159```sh
160git fetch origin
161SHA=$(git rev-parse origin/main) # the merge commit of the release pull request
162gh run list -R codician-team/diffinery --commit "$SHA"
163```
164
165## 9. Tag and publish the GitHub release
166
167Write the release notes to a file, `notes.md`, outside the repository. Use the shape of
168the earlier releases:
169
1701. One paragraph: what Diffinery is, and what this release is about.
1712. The links line:
172 `**[Deploy your own](https://diffinery.com/docs/self-hosting/deploy)** · **[Documentation](https://diffinery.com/docs)** · **[Changelog](https://github.com/codician-team/diffinery/blob/main/CHANGELOG.md)**`
1733. `## Highlights`: three to seven bullets, each a bold sentence and one or two sentences
174 more, with a link to the docs page.
1754. `## Updating`: for existing instances, `git fetch --tags && git checkout vX.Y.Z`, then
176 `scripts/setup.sh` or Deploy, plus anything the changelog's **Self-hosting** section
177 asks for (new secrets, settings, migrations).
1785. `## Known gaps`: copied from ROADMAP.md's *Known gaps*, shortened.
1796. The full list: a link to the version's section of CHANGELOG.md, such as
180 `https://github.com/codician-team/diffinery/blob/main/CHANGELOG.md#020---2026-10-31` for
181 `## [0.2.0] - 2026-10-31`.
182
183Then create the tag and the release in one step:
184
185```sh
186gh release create vX.Y.Z -R codician-team/diffinery --target "$SHA" \
187 --title "Diffinery vX.Y.Z: <what the release is about>" --notes-file notes.md --latest
188```
189
190Check that:
191
192- https://github.com/codician-team/diffinery/releases/tag/vX.Y.Z shows the notes, marked
193 **Latest**.
194- `git ls-remote --tags origin vX.Y.Z` prints `$SHA`.
195- The compare link in CHANGELOG.md opens.
196
197If a mistake slips into the notes, edit them with `gh release edit vX.Y.Z --notes-file
198notes.md`. Never move a tag that has been published: fix forward with a patch release.
199
200## Extensions and plugins
201
202Check whether these changed since the last release:
203
204```sh
205git diff --stat "$PREV"..origin/main -- apps/vscode apps/jetbrains plugins
206```
207
208- **VS Code, Cursor, Windsurf extension**: bump `version` in `apps/vscode/package.json`,
209 add an entry to `apps/vscode/CHANGELOG.md`, and publish to the marketplaces as described
210 in [apps/vscode/PUBLISHING.md](../apps/vscode/PUBLISHING.md).
211- **JetBrains plugin**: bump `pluginVersion` in `apps/jetbrains/gradle.properties` and add
212 an entry to `apps/jetbrains/CHANGELOG.md`.
213- **Claude Code and Codex plugins**: bump the plugin's version in its manifests and in both
214 marketplace files, pack it with `python3 scripts/pack-plugins.py <name>`, and replace its
215 zip in `apps/diffinery/claude-plugins`, as described in
216 [apps/diffinery/claude-plugins/README.md](../apps/diffinery/claude-plugins/README.md).
217
218Their changes can go in the release pull request or in one of their own before it. Mention
219them in the release notes when people should update.