@@ -18,12 +18,21 @@ jobs:
1818 - windows-latest
1919 steps :
2020 - name : Fetch code
21- uses : actions/checkout@v1
21+ uses : actions/checkout@v4
2222 with :
2323 submodules : true
2424
25+ - name : Get minimal Node.js version from package.json
26+ id : node-version
27+ run : echo "::set-output name=version::$(node -p 'require("./package.json").engines.node.match(/(\d+)\..*$/)[1]')"
28+
29+ - name : Use Node.js ${{ steps.node-version.outputs.version }}
30+ uses : actions/setup-node@v4
31+ with :
32+ node-version : ${{ steps.node-version.outputs.version }}
33+
2534 - name : Install dependencies
26- run : yarn install --ignore-scripts
35+ run : npm install --ignore-scripts
2736
2837 - name : Build addon
2938 if : runner.os != 'Linux'
@@ -33,33 +42,11 @@ jobs:
3342 if : runner.os == 'Linux'
3443 run : make build-addon-linux
3544
36- - name : Get minimal Node.js version from package.json (Linux & macOS)
37- id : node-version-nix
38- if : runner.os != 'Windows'
39- run : echo "::set-output name=version::$(node -p 'require("./package.json").engines.node.match(/(\d.*)$/)[0]')"
40-
41- - name : Use Node.js ${{ steps.node-version-nix.outputs.version }} (Linux & macOS)
42- if : runner.os != 'Windows'
43- uses : actions/setup-node@v1
44- with :
45- node-version : ${{ steps.node-version-nix.outputs.version }}
46-
47- - name : Get minimal Node.js version from package.json (Windows)
48- id : node-version-win
49- if : runner.os == 'Windows'
50- run : echo "::set-output name=version::$(node -p 'require(\"./package.json\").engines.node.match(/(\d.*)$/)[0]')"
51-
52- - name : Use Node.js ${{ steps.node-version-win.outputs.version }} (Windows)
53- if : runner.os == 'Windows'
54- uses : actions/setup-node@v1
55- with :
56- node-version : ${{ steps.node-version-win.outputs.version }}
57-
5845 - name : Run tests for addon
5946 run : make test-tap
6047
6148 - name : Upload prebuilds
62- uses : actions/upload-artifact@v1
49+ uses : actions/upload-artifact@v4
6350 with :
6451 name : addon-${{ runner.os }}
6552 path : prebuilds
@@ -70,30 +57,34 @@ jobs:
7057 runs-on : ubuntu-latest
7158 steps :
7259 - name : Fetch code
73- uses : actions/checkout@v1
60+ uses : actions/checkout@v4
7461 with :
7562 submodules : true
7663
7764 - name : Install dependencies
78- run : yarn install --ignore-scripts
65+ run : npm install --ignore-scripts
7966
8067 - name : Download macOS addon
81- uses : actions/download-artifact@v1
68+ uses : actions/download-artifact@v4
8269 with :
8370 name : addon-macOS
8471
8572 - name : Download Linux addon
86- uses : actions/download-artifact@v1
73+ uses : actions/download-artifact@v4
8774 with :
8875 name : addon-Linux
8976
9077 - name : Download Windows addon
91- uses : actions/download-artifact@v1
78+ uses : actions/download-artifact@v4
9279 with :
9380 name : addon-Windows
9481
9582 - name : Move addons to one folder
96- run : mkdir prebuilds && mv ./addon-*/* ./prebuilds/
83+ run : |
84+ mkdir prebuilds
85+ mv darwin-arm64 prebuilds
86+ mv linux-x64 prebuilds
87+ mv win32-x64 prebuilds
9788
9889 - name : Build package
9990 run : make package
10394 run : echo "::set-output name=version::$(node -p 'require("./package.json").version')"
10495
10596 - name : Upload package
106- uses : actions/upload-artifact@v1
97+ uses : actions/upload-artifact@v4
10798 with :
10899 name : package
109100 path : secp256k1-${{ steps.pkg-version.outputs.version }}.tgz
@@ -113,11 +104,11 @@ jobs:
113104 runs-on : ubuntu-latest
114105 steps :
115106 - name : Fetch code
116- uses : actions/checkout@v1
107+ uses : actions/checkout@v4
117108 with :
118109 fetch-depth : 1
119110
120- - uses : actions/cache@v1
111+ - uses : actions/cache@v4
121112 id : cache
122113 with :
123114 path : clang
@@ -137,12 +128,10 @@ jobs:
137128 runs-on : ubuntu-latest
138129 steps :
139130 - name : Fetch code
140- uses : actions/checkout@v1
141- with :
142- fetch-depth : 1
131+ uses : actions/checkout@v4
143132
144133 - name : Install dependencies
145- run : yarn install --ignore-scripts
134+ run : npm install --ignore-scripts
146135
147136 - name : Run lint command
148137 run : make lint-js
0 commit comments