Skip to content

Commit

Permalink
fix node-gyp in release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor44 committed Jun 21, 2023
1 parent c10a1ed commit aa825c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
run: yarn run gql-gen
- name: Build and Release
run: yarn run release

MacOs:
runs-on: macos-latest
env:
Expand Down Expand Up @@ -68,15 +69,13 @@ jobs:
- uses: actions/setup-node@master
with:
node-version: "18"
- name: Update node-gyp
run: |
$WhereNode = Get-Command node | Select-Object -ExpandProperty Definition
$NodeDirPath = Split-Path $WhereNode -Parent
$NodeModulesPath = $NodeDirPath + "\node_modules\npm\node_modules\@npmcli\run-script"
cd $NodeModulesPath
npm install node-gyp@latest
- name: Update registry URL
- name: Configure Node
shell: powershell
run: |
# npm v9 doesn't allow custom config parameters (i.e. node_gyp) anymode, so we have to downgrade it to v8
npm install -g npm@8
npm install -g node-gyp@latest
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
npm config set registry "http://registry.npmjs.org"
yarn config set registry "http://registry.npmjs.org"
yarn config set network-timeout 300000
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
# run: yarn run lint:ci
- name: Build
run: yarn run build

MacOs:
runs-on: macos-latest
env:
Expand Down

0 comments on commit aa825c5

Please sign in to comment.