Skip to content

chore(main): release chrome-devtools-mcp 0.9.0 (#378) #28

chore(main): release chrome-devtools-mcp 0.9.0 (#378)

chore(main): release chrome-devtools-mcp 0.9.0 (#378) #28

name: publish-on-tag
on:
push:
tags:
- 'chrome-devtools-mcp-v*'
workflow_dispatch:
inputs:
npm-publish:
description: 'Try to publish to NPM'
default: false
type: boolean
mcp-publish:
description: 'Try to publish to MCP registry'
default: true
type: boolean
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
publish-to-npm:
runs-on: ubuntu-latest
if: ${{ (github.event_name != 'workflow_dispatch') || (inputs.npm-publish && always()) }}
steps:
- name: Check out repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 2
- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
cache: npm
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
# Ensure npm 11.5.1 or later is installed
- name: Update npm
run: npm install -g npm@latest
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
NODE_ENV: 'production'
- name: Publish
run: |
npm publish --provenance --access public
publish-to-mcp-registry:
runs-on: ubuntu-latest
needs: publish-to-npm
if: ${{ (github.event_name != 'workflow_dispatch' && needs.publish-to-npm.result == 'success') || (inputs.mcp-publish && always()) }}
steps:
- name: Check out repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 2
- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
cache: npm
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
# Ensure npm 11.5.1 or later is installed
- name: Update npm
run: npm install -g npm@latest
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
NODE_ENV: 'production'
- name: Install MCP Publisher
run: |
export OS=$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_${OS}.tar.gz" | tar xz mcp-publisher
- name: Login to MCP Registry
run: ./mcp-publisher login github-oidc
- name: Publish to MCP Registry
run: ./mcp-publisher publish