Skip to content

v0.0.3

v0.0.3 #3

name: "Playwright MCP for Cloudflare - Publish NPM"
on:
release:
types: [published]
jobs:
cf-release:
name: "Publish Playwright MCP for Cloudflare to NPM"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Run npm ci
run: npm ci
- name: Run playwright-mcp-cloudflare build
run: |
cd cloudflare
npm run build
- name: Determine version
id: version
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
echo "Triggered by tag: ${GITHUB_REF#refs/tags/}"
VERSION="${GITHUB_REF#refs/tags/}"
else
echo "❌ Unexpected trigger: ${GITHUB_REF}"
exit 1
fi
# Set the output for later steps
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
- name: Publish to npm
run: |
cd cloudflare
cp ../README.md .
npm version ${{ steps.version.outputs.VERSION }} --no-git-tag-version
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}