File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build VSCode Extension (multi-platform)
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ workflow_dispatch : {}
8+
9+ jobs :
10+ build :
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ matrix :
14+ os : [ubuntu-latest, windows-latest, macos-latest]
15+ node : [20]
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Setup Node.js
21+ uses : actions/setup-node@v4
22+ with :
23+ node-version : ${{ matrix.node }}
24+ cache : ' npm'
25+
26+ - name : Install dependencies
27+ run : npm ci
28+
29+ - name : Build TypeScript
30+ run : npm run build || echo "No build step"
31+
32+ - name : Package VSIX
33+ run : |
34+ if [ "${{ runner.os }}" = "Windows" ]; then
35+ npx @vscode/vsce package --target win32-x64
36+ elif [ "${{ runner.os }}" = "Linux" ]; then
37+ npx @vscode/vsce package --target linux-x64
38+ elif [ "${{ runner.os }}" = "macOS" ]; then
39+ arch=$(uname -m)
40+ if [ "$arch" = "arm64" ]; then
41+ npx @vscode/vsce package --target darwin-arm64
42+ else
43+ npx @vscode/vsce package --target darwin-x64
44+ fi
45+ fi
46+
47+ - name : Upload VSIX artifact
48+ uses : actions/upload-artifact@v4
49+ with :
50+ name : vscode-extension
51+ path : ' *.vsix'
You can’t perform that action at this time.
0 commit comments