Skip to content

Commit c0dd9d7

Browse files
authored
Add GitHub Actions YAML snippets. Closes #301 (#323)
Closes #301
1 parent 689e12b commit c0dd9d7

File tree

6 files changed

+103
-5
lines changed

6 files changed

+103
-5
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
1010
## [1.1.0] - Unreleased
1111

12+
### Added:
13+
14+
- Snippets: Added `devproxy-action-setup` - GitHub Actions step: Setup Dev Proxy (recommended)
15+
- Snippets: Added `devproxy-action-start` - GitHub Actions step: Start Dev Proxy manually
16+
- Snippets: Added `devproxy-action-stop` - GitHub Actions step: Stop Dev Proxy
17+
- Snippets: Added `devproxy-action-record-start` - GitHub Actions step: Start Dev Proxy recording
18+
- Snippets: Added `devproxy-action-record-stop` - GitHub Actions step: Stop Dev Proxy recording
19+
- Snippets: Added `devproxy-action-chromium-cert` - GitHub Actions step: Install Dev Proxy certificate for Chromium browsers
20+
1221
### Changed:
1322

1423
- Snippets: All snippets that reference schemas updated to use `v1.1.0` schema

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ See [Dev Proxy MCP Server](https://github.com/dev-proxy-tools/mcp) for more info
8282

8383
### Snippets
8484

85+
#### JSON
86+
8587
| Prefix | Description |
8688
| ------ | ----------- |
8789
| `devproxy-config-file` | Dev Proxy config file |
@@ -179,6 +181,17 @@ See [Dev Proxy MCP Server](https://github.com/dev-proxy-tools/mcp) for more info
179181
| `devproxy-task-start` | Start Dev Proxy VS Code Task |
180182
| `devproxy-task-stop` | Stop Dev Proxy VS Code Task |
181183

184+
#### YAML
185+
186+
| Prefix | Description |
187+
| ------ | ----------- |
188+
| `devproxy-action-setup` | GitHub Actions step: Setup Dev Proxy (recommended) |
189+
| `devproxy-action-start` | GitHub Actions step: Start Dev Proxy manually |
190+
| `devproxy-action-stop` | GitHub Actions step: Stop Dev Proxy |
191+
| `devproxy-action-record-start` | GitHub Actions step: Start Dev Proxy recording |
192+
| `devproxy-action-record-stop` | GitHub Actions step: Stop Dev Proxy recording |
193+
| `devproxy-action-chromium-cert` | GitHub Actions step: Install Dev Proxy certificate for Chromium browsers |
194+
182195
### Status Bar
183196

184197
- Display installed Dev Proxy version

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,19 @@
163163
"snippets": [
164164
{
165165
"language": "json",
166-
"path": "./dist/snippets.json"
166+
"path": "./dist/json-snippets.json"
167167
},
168168
{
169169
"language": "jsonc",
170-
"path": "./dist/snippets.json"
170+
"path": "./dist/json-snippets.json"
171+
},
172+
{
173+
"language": "yaml",
174+
"path": "./dist/yaml-snippets.json"
175+
},
176+
{
177+
"language": "yml",
178+
"path": "./dist/yaml-snippets.json"
171179
}
172180
],
173181
"configuration": {
File renamed without changes.

src/snippets/yaml-snippets.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"DevProxyActionSetup": {
3+
"prefix": "devproxy-action-setup",
4+
"body": [
5+
"- name: Setup Dev Proxy",
6+
" id: setup-devproxy",
7+
" uses: dev-proxy-tools/actions/setup@v1",
8+
" with:",
9+
" version: ${1:latest} # Optional: specify version, e.g. v1.0.0",
10+
" auto-start: ${2:true} # Optional: automatically start Dev Proxy",
11+
" auto-stop: ${3:true} # Optional: automatically stop Dev Proxy after workflow completes",
12+
" auto-record: ${4:false} # Optional: automatically start Dev Proxy in recording mode",
13+
" config-file: ${5:devproxyrc.json} # Optional: path to Dev Proxy config file",
14+
" log-file: ${6:devproxy.log} # Optional: path to log Dev Proxy output",
15+
" enable-cache: ${7:true} # Optional: enable caching of Dev Proxy installation",
16+
" report-job-summary: ${8:\\$GITHUB_STEP_SUMMARY} # Optional: path to output report content"
17+
],
18+
"description": "GitHub Actions step: Setup Dev Proxy (recommended)"
19+
},
20+
"DevProxyActionStart": {
21+
"prefix": "devproxy-action-start",
22+
"body": [
23+
"- name: Start Dev Proxy",
24+
" id: start-devproxy",
25+
" uses: dev-proxy-tools/actions/start@v1",
26+
" with:",
27+
" auto-stop: ${1:true} # Optional: automatically stop Dev Proxy after workflow completes",
28+
" auto-record: ${2:false} # Optional: automatically start Dev Proxy in recording mode",
29+
" config-file: ${3:devproxyrc.json} # Optional: path to Dev Proxy config file",
30+
" log-file: ${4:devproxy.log} # Optional: path to log Dev Proxy output",
31+
" report-job-summary: ${5:\\$GITHUB_STEP_SUMMARY} # Optional: path to output report content"
32+
],
33+
"description": "GitHub Actions step: Start Dev Proxy manually"
34+
},
35+
"DevProxyActionStop": {
36+
"prefix": "devproxy-action-stop",
37+
"body": [
38+
"- name: Stop Dev Proxy",
39+
" uses: dev-proxy-tools/actions/stop@v1"
40+
],
41+
"description": "GitHub Actions step: Stop Dev Proxy"
42+
},
43+
"DevProxyActionRecordStart": {
44+
"prefix": "devproxy-action-record-start",
45+
"body": [
46+
"- name: Start recording",
47+
" uses: dev-proxy-tools/actions/record-start@v1"
48+
],
49+
"description": "GitHub Actions step: Start Dev Proxy recording"
50+
},
51+
"DevProxyActionRecordStop": {
52+
"prefix": "devproxy-action-record-stop",
53+
"body": [
54+
"- name: Stop recording",
55+
" uses: dev-proxy-tools/actions/record-stop@v1"
56+
],
57+
"description": "GitHub Actions step: Stop Dev Proxy recording"
58+
},
59+
"DevProxyActionChromiumCert": {
60+
"prefix": "devproxy-action-chromium-cert",
61+
"body": [
62+
"- name: Install Dev Proxy certificate for Chromium",
63+
" uses: dev-proxy-tools/actions/chromium-cert@v1"
64+
],
65+
"description": "GitHub Actions step: Install Dev Proxy certificate for Chromium browsers"
66+
}
67+
}

webpack.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ const extensionConfig = {
4848
plugins: [
4949
new CopyPlugin({
5050
patterns: [
51-
{ from: 'src/snippets.json', to: '[name][ext]' },
52-
{ from: 'src/icon.png', to: '[name][ext]' },
53-
{ from: 'LICENSE', to: '[name][ext]' },
51+
{from: 'src/snippets/json-snippets.json', to: '[name][ext]'},
52+
{from: 'src/snippets/yaml-snippets.json', to: '[name][ext]'},
53+
{from: 'src/icon.png', to: '[name][ext]'},
54+
{from: 'LICENSE', to: '[name][ext]'},
5455
],
5556
}),
5657
],

0 commit comments

Comments
 (0)