Skip to content

Commit 09e1731

Browse files
Fix the GH Action publish
1 parent 7779bac commit 09e1731

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

.github/workflows/publish-npm.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,6 @@ jobs:
3434
cd mcp-package
3535
npm install
3636
37-
- name: Build the package
38-
run: |
39-
cd mcp-package
40-
npm run build
41-
42-
- name: Run tests
43-
run: |
44-
cd mcp-package
45-
npm test
46-
4737
- name: Determine version
4838
id: version
4939
run: |
@@ -66,9 +56,28 @@ jobs:
6656
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
6757
pkg.version = '${{ steps.version.outputs.version }}';
6858
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
69-
// Update dist/package.json
59+
"
60+
61+
- name: Build the package
62+
run: |
63+
cd mcp-package
64+
npm run build
65+
66+
- name: Run tests
67+
run: |
68+
cd mcp-package
69+
npm test
70+
71+
- name: Update dist package version
72+
run: |
73+
cd mcp-package
74+
# Update dist/package.json without triggering prepublishOnly
75+
node -e "
76+
const fs = require('fs');
7077
const distPkg = JSON.parse(fs.readFileSync('dist/package.json', 'utf8'));
7178
distPkg.version = '${{ steps.version.outputs.version }}';
79+
// Remove prepublishOnly to prevent build loop
80+
delete distPkg.scripts.prepublishOnly;
7281
fs.writeFileSync('dist/package.json', JSON.stringify(distPkg, null, 2) + '\n');
7382
"
7483

LICENSE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
MIT License
2+
13
Copyright 2017 - 2025 TheodorosPloumis
24

35
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

0 commit comments

Comments
 (0)