Skip to content

Commit daadc8e

Browse files
committed
publish
1 parent 99013f7 commit daadc8e

File tree

7 files changed

+2429
-6
lines changed

7 files changed

+2429
-6
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ fixtures-test/
3737
fixtures-test-*/
3838
.rslib/
3939
tests-dist/
40-
.vscode-test/
40+
.vscode-test/
41+
packages/vscode/*.vsix
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Release VS Code Extension
2+
3+
on:
4+
workflow_dispatch: {}
5+
push:
6+
tags:
7+
- 'v*'
8+
- 'vscode-v*'
9+
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
working-directory: packages/vscode
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Typecheck
29+
run: npm run typecheck
30+
31+
- name: Unit tests
32+
run: npm run test:unit
33+
34+
- name: Build
35+
run: npm run build
36+
37+
- name: Package VSIX
38+
run: npx vsce package
39+
40+
- name: Upload VSIX artifact
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: rstest-vsix
44+
path: packages/vscode/*.vsix
45+
46+
- name: Publish to VS Code Marketplace
47+
if: ${{ secrets.VSCE_PAT != '' }}
48+
env:
49+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
50+
run: npx vsce publish
51+
52+
- name: Create GitHub Release (tag push only)
53+
if: startsWith(github.ref, 'refs/tags/')
54+
uses: softprops/action-gh-release@v2
55+
with:
56+
files: packages/vscode/*.vsix

packages/vscode/LICENSE.md

Lines changed: 1021 additions & 0 deletions
Large diffs are not rendered by default.

packages/vscode/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,16 @@
3838
}
3939
},
4040
"scripts": {
41-
"vscode:prepublish": "npm run build",
4241
"build": "rslib build",
4342
"lint": "biome check . --diagnostic-level=warn",
4443
"build:local": "SOURCEMAP=true rslib build",
4544
"test:e2e": "cross-env FORCE_COLOR=1 tsc -p tsconfig.test.json && cross-env FORCE_COLOR=1 node ./tests-dist/runTest.js",
4645
"test:unit": "rstest",
4746
"test": "npm run test:unit && npm run test:e2e",
4847
"typecheck": "tsc --noEmit",
49-
"watch": "rslib build --watch"
48+
"watch": "rslib build --watch",
49+
"package:vsix": "npm run build && vsce package",
50+
"publish:vsce": "vsce publish"
5051
},
5152
"devDependencies": {
5253
"@rsbuild/core": "1.5.0",
@@ -60,6 +61,7 @@
6061
"@types/ws": "^8.18.1",
6162
"@vscode/test-cli": "^0.0.11",
6263
"@vscode/test-electron": "^2.5.2",
64+
"@vscode/vsce": "3.6.0",
6365
"get-port": "^7.1.0",
6466
"glob": "^7.1.4",
6567
"mocha": "^11.7.2",

packages/vscode/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class Rstest {
104104
private setupTestController() {
105105
const runHandler = (
106106
request: vscode.TestRunRequest,
107-
cancellation: vscode.CancellationToken,
107+
_cancellation: vscode.CancellationToken,
108108
) => {
109109
if (request.continuous) {
110110
vscode.window.showInformationMessage(

0 commit comments

Comments
 (0)