File tree Expand file tree Collapse file tree 2 files changed +68
-0
lines changed
Expand file tree Collapse file tree 2 files changed +68
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Playwright MCP for Cloudflare - CI"
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ - uses : actions/setup-node@v4
15+ with :
16+ node-version : ' 20.x'
17+ registry-url : ' https://registry.npmjs.org'
18+
19+ - run : |
20+ npm ci
21+ cd cloudflare
22+ npm run build
Original file line number Diff line number Diff line change 1+ name : " Playwright MCP for Cloudflare - Publish NPM"
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ cf-release :
9+ name : " Publish Playwright MCP for Cloudflare to NPM"
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ - uses : actions/setup-node@v4
14+ with :
15+ node-version : " 20.x"
16+ registry-url : " https://registry.npmjs.org"
17+
18+ - name : Run npm ci
19+ run : npm ci
20+
21+ - name : Run playwright-mcp-cloudflare build
22+ run : |
23+ cd cloudflare
24+ npm run build
25+
26+ - name : Determine version
27+ id : version
28+ run : |
29+ if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
30+ echo "Triggered by tag: ${GITHUB_REF#refs/tags/}"
31+ VERSION="${GITHUB_REF#refs/tags/}"
32+ else
33+ echo "❌ Unexpected trigger: ${GITHUB_REF}"
34+ exit 1
35+ fi
36+ # Set the output for later steps
37+ echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
38+
39+ - name : Publish to npm
40+ run : |
41+ cd cloudflare
42+ cp ../README.md .
43+ npm version ${{ steps.version.outputs.VERSION }} --no-git-tag-version
44+ npm publish
45+ env :
46+ NODE_AUTH_TOKEN : ${{ secrets.NODE_AUTH_TOKEN }}
You can’t perform that action at this time.
0 commit comments