Skip to content

Commit ba9dc3c

Browse files
authored
Merge pull request #11 from bucketeer-io/add/publish-npm
ci: publish npm
2 parents ba5035f + 1c5427b commit ba9dc3c

File tree

4 files changed

+80
-2
lines changed

4 files changed

+80
-2
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: prepare release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
type: string
8+
required: true
9+
description: 'New version number. e.g. "0.1.2"'
10+
11+
jobs:
12+
create-pr:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
- name: Setup Node.js
17+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
18+
with:
19+
node-version: '24.x'
20+
- name: Update version
21+
run: VERSION=${{ inputs.version }} npm run prepare-release
22+
- name: Create a PR
23+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
24+
with:
25+
title: "[bot] release ${{ inputs.version }}"
26+
commit-message: "[bot] release ${{ inputs.version }}"
27+
body: "This PR updates the version to ${{ inputs.version }}."
28+
branch: "release-${{ inputs.version }}"
29+
base: "main"
30+
delete-branch: true
31+
labels: "release"
32+
signoff: true
33+
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: release package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
packages: write
12+
contents: read
13+
steps:
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
- name: Setup Node.js
16+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
17+
with:
18+
node-version: '24.x'
19+
registry-url: https://npm.pkg.github.com/
20+
scope: '@bucketeer'
21+
- name: Install dependencies
22+
run: npm ci
23+
- name: Build
24+
run: npm run build
25+
- name: Publish
26+
run: npm publish
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
{
2-
"name": "bucketeer-docs-local-mcp-server",
2+
"name": "@bucketeer/docs-local-mcp-server",
33
"version": "0.0.1",
44
"description": "Local MCP Server to query Bucketeer documentation",
55
"main": "dist/main.js",
6+
"bin": {
7+
"docs-local-mcp-server": "dist/main.js"
8+
},
69
"type": "module",
10+
"files": ["dist/", "README.md", "LICENSE"],
711
"scripts": {
812
"build": "tsc",
913
"build:index": "node dist/scripts/buildIndex.js",
@@ -13,10 +17,14 @@
1317
"dev": "npm run build && npm start",
1418
"lint": "biome check .",
1519
"lint:fix": "biome check --write .",
16-
"test:ci": "echo \"No tests specified\" && exit 0"
20+
"test:ci": "echo \"No tests specified\" && exit 0",
21+
"prepare-release": "npm version $VERSION --no-git-tag-version"
1722
},
1823
"keywords": ["mcp", "documentation", "search", "bucketeer"],
1924
"license": "Apache-2.0",
25+
"engines": {
26+
"node": ">=18.0.0"
27+
},
2028
"dependencies": {
2129
"@modelcontextprotocol/sdk": "^1.8.0",
2230
"@biomejs/biome": "1.9.4",
@@ -28,5 +36,12 @@
2836
"devDependencies": {
2937
"@types/node": "^22.0.0",
3038
"typescript": "^5.5.3"
39+
},
40+
"repository": {
41+
"type": "git",
42+
"url": "git+https://github.com/bucketeer-io/bucketeer-docs-local-mcp-server.git"
43+
},
44+
"publishConfig": {
45+
"@bucketeer:registry": "https://npm.pkg.github.com"
3146
}
3247
}

src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env node
2+
13
import { fileURLToPath } from 'node:url';
24
// src/main.ts
35
import { startMcpServer } from './mcp/server.js';

0 commit comments

Comments
 (0)