@@ -55,33 +55,39 @@ jobs:
55
55
prebuild-test :
56
56
strategy :
57
57
matrix :
58
- os :
59
- - ubuntu-latest
60
- - macos-latest
61
- - windows-latest
58
+ os_and_node :
59
+ - { os: " ubuntu-latest", node: "18" }
60
+ - { os: " macos-latest", node: "18" }
61
+ - { os: " windows-2019", node: "14" }
62
62
fail-fast : false
63
- name : Prebuild on ${{ matrix.os }}
64
- runs-on : ${{ matrix.os }}
63
+ name : Prebuild on ${{ matrix.os_and_node. os }}
64
+ runs-on : ${{ matrix.os_and_node. os }}
65
65
steps :
66
66
- uses : actions/checkout@v3
67
67
with :
68
68
submodules : true
69
69
fetch-depth : 0
70
70
- uses : actions/setup-node@v3
71
71
with :
72
- node-version : 16
72
+ node-version : ${{ matrix.os_and_node.node }}
73
73
- name : Update node-gyp
74
- if : ${{ matrix.os == 'windows-latest' }}
75
- shell : powershell
74
+ if : ${{ matrix.os_and_node.os == 'windows-2019' }}
76
75
run : |
77
- npm install --global node-gyp@latest
78
- npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
76
+ $WhereNode = Get-Command node | Select-Object -ExpandProperty Definition
77
+ $NodeDirPath = Split-Path $WhereNode -Parent
78
+ $NodeModulesPath = $NodeDirPath + "\node_modules\npm\node_modules\npm-lifecycle"
79
+ cd $NodeModulesPath
80
+ npm install node-gyp@latest
81
+ npm config set msvs_version 2017
82
+ npm config set msvs-version 2017
83
+ npm config set msvs_version 2017 --global
84
+ npm config set msvs-version 2017 --global
79
85
- run : npm install --ignore-scripts
80
86
- run : npx --no-install prebuild -r node -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0
81
87
- run : npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0
82
- - if : matrix.os == 'windows-latest '
88
+ - if : matrix.os_and_node. os == 'windows-2019 '
83
89
run : npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch ia32
84
- - if : matrix.os == 'macos-latest'
90
+ - if : matrix.os_and_node. os == 'macos-latest'
85
91
run : npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch arm64
86
92
87
93
publish :
0 commit comments