Skip to content

Commit db04597

Browse files
Merge pull request #16 from chriscarrollsmith/npm-publish
NPM Publish Actions workflow
2 parents d7cda76 + 48de4e5 commit db04597

File tree

5 files changed

+41
-8
lines changed

5 files changed

+41
-8
lines changed

.github/workflows/npm-publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
on:
2+
push:
3+
branches:
4+
- '**' # Run on all branches
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-node@v4
12+
with:
13+
node-version: 'latest'
14+
- run: npm ci
15+
- run: npm install -g tsx
16+
- run: npm run build # Add build step if needed
17+
- run: npm test
18+
19+
publish:
20+
needs: test
21+
if: github.ref == 'refs/heads/main' # Only run this job on main branch
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 'latest'
28+
- run: npm ci
29+
- run: npm install -g tsx
30+
- run: npm run build # Add build step here too
31+
- uses: JS-DevTools/npm-publish@v3
32+
with:
33+
token: ${{ secrets.NPM_TOKEN }}

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { ListToolsRequestSchema, CallToolRequestSchema } from "@modelcontextprot
1010
const server = new Server(
1111
{
1212
name: "task-manager-server",
13-
version: "1.0.5"
13+
version: "1.0.6"
1414
},
1515
{
1616
capabilities: {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "taskqueue-mcp",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "Task Queue MCP Server",
55
"author": "Christopher C. Smith ([email protected])",
66
"main": "dist/index.js",
@@ -19,7 +19,7 @@
1919
"build": "tsc",
2020
"start": "node dist/index.js",
2121
"dev": "tsc && node dist/index.js",
22-
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
22+
"test": "tsc && NODE_OPTIONS=--experimental-vm-modules jest",
2323
"approve-task": "node dist/src/cli.js approve-task",
2424
"list-tasks": "node dist/src/cli.js list"
2525
},

tests/integration/mcp-client.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { describe, it, expect, beforeAll, afterAll } from '@jest/globals';
44
import * as path from 'node:path';
55
import * as os from 'node:os';
66
import * as fs from 'node:fs/promises';
7-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
7+
import process from 'node:process';
88

99
interface ToolResponse {
1010
isError: boolean;
@@ -29,7 +29,7 @@ describe('MCP Client Integration', () => {
2929

3030
// Set up the transport with environment variable for test file
3131
transport = new StdioClientTransport({
32-
command: "node",
32+
command: process.execPath, // Use full path to current Node.js executable
3333
args: ["dist/index.js"],
3434
env: {
3535
TASK_MANAGER_FILE_PATH: testFilePath,
@@ -38,7 +38,7 @@ describe('MCP Client Integration', () => {
3838
}
3939
});
4040

41-
console.log('Created transport with command:', 'node', 'dist/index.js');
41+
console.log('Created transport with command:', process.execPath, 'dist/index.js');
4242

4343
// Set up the client
4444
client = new Client(

0 commit comments

Comments
 (0)