Skip to content

Commit e6debc9

Browse files
triuzziclaude
andauthored
ci: repair release pipeline for the brave-mcp fork (#19)
- verify-npm-package.mjs: resolve the package name from package.json instead of the hardcoded upstream 'chrome-devtools-mcp', which made the pre-release "Verify npm package" check fail on every fork release. - publish-to-npm-on-tag.yml: drop the upstream-only "Publish chrome-devtools" mirror step (the fork doesn't own that npm name; it failed after the real publish and skipped the MCP-registry publish). Co-authored-by: Claude <noreply@anthropic.com>
1 parent 93b26f6 commit e6debc9

2 files changed

Lines changed: 7 additions & 14 deletions

File tree

.github/workflows/publish-to-npm-on-tag.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,10 @@ jobs:
4444
env:
4545
NODE_ENV: 'production'
4646

47-
- name: Publish chrome-devtools-mcp
47+
- name: Publish brave-mcp
4848
run: |
4949
npm publish --provenance --access public
5050
51-
- name: Publish chrome-devtools
52-
run: |
53-
node --input-type=module --eval '
54-
import * as fs from "node:fs/promises";
55-
const json = await fs.readFile("package.json", "utf8");
56-
const pkg = JSON.parse(json);
57-
pkg.name = "chrome-devtools";
58-
await fs.writeFile("package.json", JSON.stringify(pkg, null, 2) + "\n");
59-
'
60-
echo 'This is the **Chrome DevTools for agents** package. Docs: https://github.com/ChromeDevTools/chrome-devtools-mcp' > README.md
61-
npm publish --provenance --access public
62-
6351
publish-to-mcp-registry:
6452
runs-on: ubuntu-latest
6553
needs: publish-to-npm

scripts/verify-npm-package.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
*/
66

77
import {execSync} from 'node:child_process';
8+
import {readFileSync} from 'node:fs';
9+
10+
// Resolve the published package name from package.json so this keeps working
11+
// across the Brave fork rename (this was hardcoded to 'chrome-devtools-mcp').
12+
const packageName = JSON.parse(readFileSync('package.json', 'utf8')).name;
813

914
// Checks that the select build files are present using `npm publish --dry-run`.
1015
function verifyPackageContents() {
@@ -14,7 +19,7 @@ function verifyPackageContents() {
1419
});
1520
// skip non-JSON output from prepare.
1621
const data = JSON.parse(output.substring(output.indexOf('{')));
17-
const files = data['chrome-devtools-mcp'].files.map(f => f.path);
22+
const files = data[packageName].files.map(f => f.path);
1823
// Check some important files.
1924
const requiredPaths = [
2025
'build/src/index.js',

0 commit comments

Comments
 (0)