diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1affe91..3ced7ad 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,16 +7,7 @@ on: - "src/**" - "pnpm-lock.yaml" - ".github/workflows/publish.yml" - workflow_dispatch: - inputs: - bump: - description: "Version bump type" - required: true - type: choice - options: - - patch - - minor - - major + workflow_dispatch: {} concurrency: group: publish-${{ github.event_name }} @@ -115,12 +106,15 @@ jobs: - run: pnpm build - - name: Bump version + - name: Read version + guard against retag id: version run: | - npm version ${{ inputs.bump }} --no-git-tag-version --ignore-scripts VERSION=$(node -p "require('./package.json').version") echo "version=$VERSION" >> "$GITHUB_OUTPUT" + if git rev-parse "v${VERSION}" >/dev/null 2>&1; then + echo "::error::Tag v${VERSION} already exists. Bump package.json on main via a PR before dispatching." + exit 1 + fi - name: Generate changelog id: changelog @@ -159,14 +153,12 @@ jobs: echo "CHANGELOG_EOF" } >> "$GITHUB_OUTPUT" - - name: Commit and tag + - name: Tag release run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git add package.json - git commit -m "chore(release): v${{ steps.version.outputs.version }}" git tag -a "v${{ steps.version.outputs.version }}" -m "v${{ steps.version.outputs.version }}" - git push origin main --follow-tags + git push origin "v${{ steps.version.outputs.version }}" - name: Publish to npm run: | @@ -179,6 +171,9 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + cat <<'NOTES_EOF' > /tmp/release-notes.md + ${{ steps.changelog.outputs.body }} + NOTES_EOF gh release create "v${{ steps.version.outputs.version }}" \ --title "@vllnt/convex-mcp v${{ steps.version.outputs.version }}" \ - --notes "${{ steps.changelog.outputs.body }}" + --notes-file /tmp/release-notes.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c6671a0..23c73f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.3.0] - 2026-04-27 +## [0.3.1] - 2026-04-27 ### Added diff --git a/README.md b/README.md index a9e65e0..505177a 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ createMCPServer({ resources?: Record; convexUrl?: string; // defaults to CONVEX_URL or NEXT_PUBLIC_CONVEX_URL name?: string; // MCP server name (default: "convex-mcp") - version?: string; // MCP server version (default: "0.3.0") + version?: string; // MCP server version (default: "0.3.1") pagination?: PaginationConfig; // opt-in pagination + two-phase discovery }) ``` diff --git a/docs/api-reference.md b/docs/api-reference.md index b735d20..b9ee081 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -13,7 +13,7 @@ const mcp = createMCPServer({ resources?: Record; convexUrl?: string; // defaults to CONVEX_URL or NEXT_PUBLIC_CONVEX_URL env var name?: string; // MCP server name (default: "convex-mcp") - version?: string; // MCP server version (default: "0.3.0") + version?: string; // MCP server version (default: "0.3.1") pagination?: PaginationConfig; // opt-in pagination + two-phase discovery hooks?: LifecycleHooks; // before/success/error tool-call hooks }); @@ -28,7 +28,7 @@ const mcp = createMCPServer({ | `resources` | `Record` | No | `{}` | Named MCP resources. Keys are URI template patterns. | | `convexUrl` | `string` | No | env var | Convex deployment URL. Falls back to `CONVEX_URL` then `NEXT_PUBLIC_CONVEX_URL`. | | `name` | `string` | No | `"convex-mcp"` | Server name reported in MCP `initialize` response. | -| `version` | `string` | No | `"0.3.0"` | Server version reported in MCP `initialize` response. | +| `version` | `string` | No | `"0.3.1"` | Server version reported in MCP `initialize` response. | | `pagination` | `PaginationConfig` | No | — | Opt-in pagination and two-phase discovery. See [Pagination](#pagination). | | `hooks` | `LifecycleHooks` | No | — | Lifecycle hooks for tool calls. See [`LifecycleHooks`](#lifecyclehooks). | diff --git a/llms-full.txt b/llms-full.txt index 7f8edfd..ccaf5a8 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -55,7 +55,7 @@ const mcp = createMCPServer({ // OPTIONAL: MCP server name (default: "convex-mcp") name?: string, - // OPTIONAL: MCP server version (default: "0.3.0") + // OPTIONAL: MCP server version (default: "0.3.1") version?: string, // OPTIONAL: pagination and two-phase discovery diff --git a/package.json b/package.json index 6a9cce4..39d0fa3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vllnt/convex-mcp", - "version": "0.3.0", + "version": "0.3.1", "description": "Expose Convex functions as MCP tools with zero boilerplate", "type": "module", "main": "./dist/index.cjs", diff --git a/src/server.ts b/src/server.ts index 85d4a1a..9579d0f 100644 --- a/src/server.ts +++ b/src/server.ts @@ -55,7 +55,7 @@ export function createMCPServer(config: ServerConfig): ConvexMCPServer { } const serverName = config.name ?? "convex-mcp"; - const serverVersion = config.version ?? "0.3.0"; + const serverVersion = config.version ?? "0.3.1"; const hooks = config.hooks; const prepared = prepareTools(config.tools ?? {});