Skip to content

Commit 7666823

Browse files
committed
release: v0.1.3 (add hosted remote; OIDC release workflow)
1 parent 0aea0a5 commit 7666823

5 files changed

Lines changed: 88 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Release
2+
3+
# Publishes to npm and the official MCP Registry when a version tag (vX.Y.Z) is pushed.
4+
#
5+
# Credentials:
6+
# - npm: NO token. Uses npm Trusted Publishing (OIDC). Configure a trusted
7+
# publisher on the @noteboxd/mcp package (npmjs.com -> package -> Settings ->
8+
# Trusted Publishers) bound to this repo + workflow file "release.yml".
9+
# - MCP Registry: the DNS namespace (com.noteboxd) is authenticated with the
10+
# ed25519 key behind the noteboxd.com TXT record, provided as the
11+
# MCP_DNS_PRIVATE_KEY secret (its repository access must include this repo).
12+
#
13+
# Cut a release:
14+
# 1. Bump the version in package.json, server.json, and src/config.ts (keep equal).
15+
# 2. git commit + git tag vX.Y.Z + git push --follow-tags
16+
17+
on:
18+
push:
19+
tags:
20+
- "v*"
21+
22+
jobs:
23+
release:
24+
runs-on: ubuntu-latest
25+
permissions:
26+
id-token: write # required for npm Trusted Publishing (OIDC)
27+
contents: read
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: actions/setup-node@v4
32+
with:
33+
node-version: "22"
34+
registry-url: "https://registry.npmjs.org"
35+
36+
- name: Verify tag matches package.json and server.json versions
37+
run: |
38+
TAG="${GITHUB_REF_NAME#v}"
39+
PKG="$(node -p "require('./package.json').version")"
40+
SRV="$(node -p "require('./server.json').version")"
41+
if [ "$TAG" != "$PKG" ] || [ "$TAG" != "$SRV" ]; then
42+
echo "Version mismatch: tag=$TAG package.json=$PKG server.json=$SRV"
43+
exit 1
44+
fi
45+
46+
- name: Install dependencies
47+
run: npm install
48+
49+
- name: Upgrade npm (Trusted Publishing requires npm >= 11.5)
50+
run: npm install -g npm@latest
51+
52+
- name: Publish to npm (OIDC, no token)
53+
run: npm publish
54+
55+
- name: Install mcp-publisher
56+
run: |
57+
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_linux_amd64.tar.gz" | tar xz mcp-publisher
58+
sudo mv mcp-publisher /usr/local/bin/
59+
60+
- name: Publish to MCP Registry (DNS auth)
61+
env:
62+
MCP_DNS_PRIVATE_KEY: ${{ secrets.MCP_DNS_PRIVATE_KEY }}
63+
run: |
64+
mcp-publisher login dns --domain noteboxd.com --private-key "$MCP_DNS_PRIVATE_KEY"
65+
mcp-publisher publish

CONTRIBUTING.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,19 @@ This package only wraps public `api.noteboxd.com/v1` endpoints. Please keep it t
2424

2525
## Releasing
2626

27-
1. Bump the version in `package.json`, `src/config.ts`, and `server.json`.
28-
2. `pnpm build`
29-
3. `npm publish`
30-
4. Update `server.json` in the MCP registry. Before submitting, add back the `$schema` field
31-
(`https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json`).
27+
Releases are automated by `.github/workflows/release.yml` on a version tag. It publishes to
28+
npm via Trusted Publishing (OIDC, no token) and to the official
29+
[MCP Registry](https://registry.modelcontextprotocol.io) via DNS auth.
30+
31+
1. Bump the version in `package.json`, `server.json`, and `src/config.ts` (keep them equal).
32+
2. Commit, then tag and push:
33+
```bash
34+
git commit -am "release: vX.Y.Z"
35+
git tag vX.Y.Z
36+
git push --follow-tags
37+
```
38+
39+
The workflow checks the tag matches the file versions before publishing.
3240

3341
## Issues
3442

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@noteboxd/mcp",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"mcpName": "com.noteboxd/mcp",
55
"description": "Model Context Protocol server for Noteboxd. Query fragrances, notes, accords, brands, perfumers, reviews, and charts from your AI assistant.",
66
"publishConfig": {

server.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
"url": "https://github.com/noteboxd/mcp",
77
"source": "github"
88
},
9-
"version": "0.1.2",
9+
"version": "0.1.3",
1010
"packages": [
1111
{
1212
"registryType": "npm",
1313
"identifier": "@noteboxd/mcp",
14-
"version": "0.1.2",
14+
"version": "0.1.3",
1515
"transport": {
1616
"type": "stdio"
1717
},
@@ -25,5 +25,11 @@
2525
}
2626
]
2727
}
28+
],
29+
"remotes": [
30+
{
31+
"type": "streamable-http",
32+
"url": "https://mcp.noteboxd.com/mcp"
33+
}
2834
]
2935
}

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Change PACKAGE_NAME here if the package is ever published under a scope.
22
export const PACKAGE_NAME = "noteboxd-mcp";
3-
export const PACKAGE_VERSION = "0.1.2";
3+
export const PACKAGE_VERSION = "0.1.3";
44

55
// Public REST API origin. Override with NOTEBOXD_API_BASE_URL.
66
export const DEFAULT_API_BASE_URL = "https://api.noteboxd.com";

0 commit comments

Comments
 (0)