Skip to content

Commit e3658e7

Browse files
fix(ci): Windows build on windows-2022 with MSVC for native modules
windows-latest now ships Visual Studio 18 which node-gyp cannot detect, breaking better-sqlite3 and serialport compilation during npm ci.
1 parent dea4a31 commit e3658e7

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- os: macos-latest
3636
platform: mac
3737
build_cmd: npm run build && npx electron-builder --mac --x64 --arm64 --publish always
38-
- os: windows-latest
38+
- os: windows-2022
3939
platform: win
4040
build_cmd: npm run build && npx electron-builder --win --publish always
4141
- os: ubuntu-latest
@@ -71,7 +71,15 @@ jobs:
7171
libopenjp2-tools \
7272
libsecret-1-dev
7373
74+
# windows-latest ships VS 18 which @electron/node-gyp cannot detect yet.
75+
# Pin windows-2022 and load MSVC before compiling native modules.
76+
- name: Setup Windows build tools
77+
if: matrix.platform == 'win'
78+
uses: ilammy/msvc-dev-cmd@v1
79+
7480
- name: Install dependencies
81+
env:
82+
GYP_MSVS_VERSION: ${{ matrix.platform == 'win' && '2022' || '' }}
7583
run: npm ci
7684

7785
- name: Typecheck & test

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "netcopilot",
3-
"version": "0.15.0",
3+
"version": "0.15.1",
44
"description": "NetCopilot – AI-powered SSH/Telnet terminal for network engineers",
55
"main": "./out/main/index.js",
66
"author": {

0 commit comments

Comments
 (0)