-
Notifications
You must be signed in to change notification settings - Fork 46
111 lines (88 loc) · 3 KB
/
build-extension.yml
File metadata and controls
111 lines (88 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Build Chrome DevTools Extension
on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install Python dependencies
run: uv sync
- name: Install DXT packaging tools
run: npm install -g @anthropic-ai/dxt
- name: Run linting
run: uv run ruff check .
- name: Run type checking
run: uv run mypy src/
- name: Run tests
run: uv run python -m pytest test_devtools_server.py -v
- name: Package extension
run: npx @anthropic-ai/dxt pack
- name: Upload extension artifact
uses: actions/upload-artifact@v4
with:
name: chrome-devtools-protocol-extension
path: chrome-devtools-protocol-*.dxt
retention-days: 30
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install DXT packaging tools
run: npm install -g @anthropic-ai/dxt
- name: Package extension for release
run: |
VERSION=$(jq -r '.version' manifest.json)
npx @anthropic-ai/dxt pack . chrome-devtools-protocol-${VERSION}.dxt
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: chrome-devtools-protocol-*.dxt
draft: false
prerelease: false
generate_release_notes: true
body: |
## Chrome DevTools Protocol Extension ${{ github.ref_name }}
### Installation
1. Download the `.dxt` file from this release
2. Open Claude Desktop
3. Go to Extensions and install the downloaded file
### Features
- Start Chrome with debugging enabled
- Monitor network requests and responses
- Inspect console logs and errors
- Analyze page performance metrics
- Execute JavaScript in browser context
- Navigate and control browser programmatically
### Usage
After installation, you can use commands like:
- `start_chrome_and_connect("localhost:3000")` - Connect to your web app
- `get_network_requests()` - View HTTP traffic
- `get_console_error_summary()` - Analyze JavaScript errors
For full documentation, see the repository README.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}