Skip to content

Commit

Permalink
fix(*): add support for v14 on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
derevnjuk committed Aug 29, 2023
1 parent 51b6abc commit 40c673f
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ jobs:
- os: windows-2019
node: 20
arch: ia32
exclude:
- os: windows-2019
node: 14
arch: x64
env:
npm_config_msvs_version: 2019
npm_config_python: python3.10
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -52,6 +45,19 @@ jobs:
node-version: ${{ matrix.node }}
architecture: ${{ matrix.arch == 'ia32' && 'x86' || 'x64' }}

# https://github.com/nodejs/node-gyp/blob/main/docs/Updating-npm-bundled-node-gyp.md#windows
- name: Update node-gyp
shell: pwsh
if: ${{ startsWith(matrix.os, 'windows') && matrix.node <= 14 }}
run: |
# Find the location of node.exe
$nodeExeLocation = Get-Command node | Select-Object -ExpandProperty Source
# Extract the directory path from the node.exe location
$nodeDir = $nodeExeLocation | Split-Path
# Install node-gyp
npm i --prefix "$nodeDir\node_modules\npm\node_modules\npm-lifecycle" node-gyp@9.4.0
npm config set msvs_version 2017
- name: Install cross-compilation tools
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
Expand Down

0 comments on commit 40c673f

Please sign in to comment.