You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci(release): publish to GitHub Packages only; document manual npmjs
Drop npmjs automation and NPM_TOKEN. Tag workflow publishes @rethunk-ai/mcp-multi-root-git to npm.pkg.github.com (ephemeral package.json patch for required org scope), keeps GitHub Release tarball from @rethunk name. HUMANS/install/README/AGENTS describe GPR vs manual npm publish.
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@
34
34
35
35
## Validation and CI
36
36
37
-
Local: `bun run build` (`rimraf dist && tsc`), `bun run check` (Biome), `bun run test` (`bun test` for [`src/repo-paths.test.ts`](src/repo-paths.test.ts)). GitHub Actions runs the same after `bun install --frozen-lockfile` on PRs and `main` ([`.github/workflows/ci.yml`](.github/workflows/ci.yml)), then uploads a **prerelease `npm pack` artifact**. Pushes of tag **`v*.*.*`** matching `package.json``version` run [`.github/workflows/release.yml`](.github/workflows/release.yml) (npm publish + GitHub Release); see [HUMANS.md](HUMANS.md) Publishing.
37
+
Local: `bun run build` (`rimraf dist && tsc`), `bun run check` (Biome), `bun run test` (`bun test` for [`src/repo-paths.test.ts`](src/repo-paths.test.ts)). GitHub Actions runs the same after `bun install --frozen-lockfile` on PRs and `main` ([`.github/workflows/ci.yml`](.github/workflows/ci.yml)), then uploads a **prerelease `npm pack` artifact**. Pushes of tag **`v*.*.*`** matching `package.json``version` run [`.github/workflows/release.yml`](.github/workflows/release.yml) (**GitHub Packages**npm publish under **`@rethunk-ai/mcp-multi-root-git`** + **GitHub Release** with tarball); **npmjs** is manual only — see [HUMANS.md](HUMANS.md) Publishing.
38
38
39
39
Optional [`.githooks/`](.githooks): run **`bun run setup-hooks`** once per clone (`core.hooksPath` → `.githooks`). **pre-commit** = `check`; **pre-push** = frozen install + build + check. See [HUMANS.md](HUMANS.md) Development.
Copy file name to clipboardExpand all lines: HUMANS.md
+16-12Lines changed: 16 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,8 @@ With **multiple MCP file roots**, the server picks a root whose git toplevel def
43
43
}
44
44
```
45
45
46
+
If you installed from **GitHub Packages**, use **`./node_modules/@rethunk-ai/mcp-multi-root-git/git-mcp-presets.schema.json`** in **`$schema`** instead (see [docs/install.md](docs/install.md#github-packages)).
@@ -90,22 +92,24 @@ bun run setup-hooks # once per clone: use .githooks (pre-commit: check; pre-pu
90
92
91
93
## Publishing
92
94
93
-
### npm (production) — version tags only
95
+
### GitHub (automated) — version tags only
94
96
95
-
Releases to [npmjs](https://www.npmjs.com/package/@rethunk/mcp-multi-root-git) are automated by [`.github/workflows/release.yml`](.github/workflows/release.yml) when you push a **semver git tag**`vX.Y.Z` that **exactly matches**`version` in `package.json` (e.g. tag `v1.2.3` and `"version": "1.2.3"`).
97
+
Tag pushes run [`.github/workflows/release.yml`](.github/workflows/release.yml): build, check, tests, then:
96
98
97
-
1.Bump **`package.json``version`**, commit on `main`.
98
-
2.Create and push the tag: `git tag vX.Y.Z && git push origin vX.Y.Z`
99
+
1.**`npm pack`** using the committed **`package.json`** name [`@rethunk/mcp-multi-root-git`](https://github.com/Rethunk-AI/mcp-multi-root-git) — tarball attached to a **GitHub Release** for that tag.
100
+
2.**GitHub Packages** (npm registry): the workflow temporarily rewrites the package **name** to **`@rethunk-ai/mcp-multi-root-git`** (required scope for org `Rethunk-AI` on GitHub) and runs **`npm publish`** to **`https://npm.pkg.github.com`** with **`GITHUB_TOKEN`** (`packages: write`). No npmjs token is used in CI.
99
101
100
-
The workflow runs build, check, and tests, publishes with **`npm publish`**, then creates a **GitHub Release**for that tag and attaches the same **`.tgz`** as a downloadable asset.
102
+
Prerequisite: push a **semver git tag**`vX.Y.Z` that **exactly matches**`version` in `package.json` (e.g. `v1.2.3` and `"version": "1.2.3"`).
101
103
102
-
**Repository secret:** add **`NPM_TOKEN`** (granular npm access token with publish permission for `@rethunk/mcp-multi-root-git` or the scope). Without it, the publish step fails.
104
+
### npmjs (manual) — maintainers only
103
105
104
-
### Local publish (maintainers)
106
+
npmjs no longer fits an unattended CI publish flow for this org; **do not** rely on automation to [npmjs](https://www.npmjs.com/package/@rethunk/mcp-multi-root-git). To publish the **same** package name consumers already use (**`@rethunk/mcp-multi-root-git`**):
105
107
106
-
```bash
107
-
bun run prepublishOnly # build + check + test
108
-
bun publish
109
-
```
108
+
1. On a clean checkout at the release commit (usually **`main`** after bumping version), run **`bun run prepublishOnly`** (or `bun run build && bun run check && bun run test`).
109
+
2. Log in to the public registry once per machine: **`npm login`** (or `npm adduser`) so **`npm whoami`** shows the account that owns **`@rethunk`** on npmjs.
110
+
3. Ensure **`package.json`** still has **`"name": "@rethunk/mcp-multi-root-git"`** and **`publishConfig.access`** is **`"public"`** (no **`publishConfig.registry`** pointing at GitHub — leave default registry for npmjs).
111
+
4. Publish: **`npm publish --access public`** (runs **`prepublishOnly`** again unless you pass **`--ignore-scripts`** after you already verified locally).
112
+
113
+
**`package.json``files`** must keep the whole **`dist/`** directory so every emitted chunk the entry imports is packed; if you add new `src/server/*.ts` modules, `tsc` emits matching **`dist/server/*.js`** files — do not narrow **`files`** back to a single **`server.js`** or installs break.
110
114
111
-
`npm publish` works if `dist/` is built and checks pass. **`package.json``files` includes the whole `dist/` directory** so every emitted chunk the entry imports is packed; if you add new `src/server/*.ts` modules, `tsc` will emit matching `dist/server/*.js` files—do not narrow `files` back to a single `server.js` or installs will break.
115
+
**Preset `$schema`:** after **`npm install`**, the schema path is under **`node_modules/@rethunk/mcp-multi-root-git/`** for npmjs, or **`node_modules/@rethunk-ai/mcp-multi-root-git/`** when installing from GitHub Packages — adjust **`$schema`** accordingly (see [docs/install.md](docs/install.md)).
Read-only **git** tools over MCP (status, multi-root inventory, `HEAD` parity, presets). **Install and MCP client wiring:****[docs/install.md](docs/install.md)** only — do not duplicate those steps elsewhere.
**Repository:**[github.com/Rethunk-AI/mcp-multi-root-git](https://github.com/Rethunk-AI/mcp-multi-root-git) · **npmjs (manual releases):**[`@rethunk/mcp-multi-root-git`](https://www.npmjs.com/package/@rethunk/mcp-multi-root-git) · **GitHub Packages (CI on each tag):**[`@rethunk-ai/mcp-multi-root-git`](https://github.com/Rethunk-AI/mcp-multi-root-git/pkgs/npm/mcp-multi-root-git) — see [docs/install.md](docs/install.md) and [HUMANS.md](HUMANS.md) Publishing.
@@ -22,17 +23,46 @@ This package is an MCP **stdio** server. The client starts the process and passe
22
23
-**Git** on `PATH` (`git --version`). The server shells out to `git`; if it is missing, tools return `git_not_found`.
23
24
-**Node.js ≥ 22** if you use **`npx`**, or **Bun** if you use **`bunx`** / **`bun`** (see `package.json``engines` / `packageManager`).
24
25
26
+
## GitHub Packages
27
+
28
+
Every **version tag** on this repo is published to the **GitHub npm registry** as **`@rethunk-ai/mcp-multi-root-git`** (scope matches the GitHub org). The **npmjs** package name **`@rethunk/mcp-multi-root-git`** is updated **manually** by maintainers and may lag; prefer GitHub Packages for CI-aligned installs.
29
+
30
+
1. Create a [GitHub personal access token](https://github.com/settings/tokens) with at least **`read:packages`** (and **`repo`** if the package were private).
31
+
2. In **`~/.npmrc`** or the project **`.npmrc`** (do not commit secrets):
32
+
33
+
```ini
34
+
@rethunk-ai:registry=https://npm.pkg.github.com
35
+
//npm.pkg.github.com/:_authToken=YOUR_TOKEN_HERE
36
+
```
37
+
38
+
3. Install or run, for example:
39
+
40
+
```bash
41
+
npx -y @rethunk-ai/mcp-multi-root-git
42
+
```
43
+
44
+
Or **`bunx @rethunk-ai/mcp-multi-root-git`** with the same registry configuration for that scope.
45
+
46
+
**`$schema` in preset JSON:** point at the copy under **`node_modules/@rethunk-ai/mcp-multi-root-git/git-mcp-presets.schema.json`** when you install from GitHub Packages; use **`@rethunk/mcp-multi-root-git/...`** when installing from npmjs.
47
+
25
48
## Ways to run the binary
26
49
27
-
Use any of these from a terminal to confirm the package runs (each starts the stdio server until EOF):
50
+
Use any of these from a terminal to confirm the package runs (each starts the stdio server until EOF). **npmjs** name:
Published entrypoint: **`dist/server.js`** (see npm `bin` / `exports`). Clients typically invoke **`npx`** or **`bunx`** so a global install is optional.
58
+
**GitHub Packages** name (after configuring **`.npmrc`** as in [GitHub Packages](#github-packages)):
59
+
60
+
```bash
61
+
npx -y @rethunk-ai/mcp-multi-root-git
62
+
bunx @rethunk-ai/mcp-multi-root-git
63
+
```
64
+
65
+
Published entrypoint: **`dist/server.js`** (see `bin` / `exports`). Clients typically invoke **`npx`** or **`bunx`** so a global install is optional.
0 commit comments