@@ -18,12 +18,21 @@ jobs:
18
18
- windows-latest
19
19
steps :
20
20
- name : Fetch code
21
- uses : actions/checkout@v1
21
+ uses : actions/checkout@v4
22
22
with :
23
23
submodules : true
24
24
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
+
25
34
- name : Install dependencies
26
- run : yarn install --ignore-scripts
35
+ run : npm install --ignore-scripts
27
36
28
37
- name : Build addon
29
38
if : runner.os != 'Linux'
@@ -33,33 +42,11 @@ jobs:
33
42
if : runner.os == 'Linux'
34
43
run : make build-addon-linux
35
44
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
-
58
45
- name : Run tests for addon
59
46
run : make test-tap
60
47
61
48
- name : Upload prebuilds
62
- uses : actions/upload-artifact@v1
49
+ uses : actions/upload-artifact@v4
63
50
with :
64
51
name : addon-${{ runner.os }}
65
52
path : prebuilds
@@ -70,30 +57,34 @@ jobs:
70
57
runs-on : ubuntu-latest
71
58
steps :
72
59
- name : Fetch code
73
- uses : actions/checkout@v1
60
+ uses : actions/checkout@v4
74
61
with :
75
62
submodules : true
76
63
77
64
- name : Install dependencies
78
- run : yarn install --ignore-scripts
65
+ run : npm install --ignore-scripts
79
66
80
67
- name : Download macOS addon
81
- uses : actions/download-artifact@v1
68
+ uses : actions/download-artifact@v4
82
69
with :
83
70
name : addon-macOS
84
71
85
72
- name : Download Linux addon
86
- uses : actions/download-artifact@v1
73
+ uses : actions/download-artifact@v4
87
74
with :
88
75
name : addon-Linux
89
76
90
77
- name : Download Windows addon
91
- uses : actions/download-artifact@v1
78
+ uses : actions/download-artifact@v4
92
79
with :
93
80
name : addon-Windows
94
81
95
82
- 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
97
88
98
89
- name : Build package
99
90
run : make package
103
94
run : echo "::set-output name=version::$(node -p 'require("./package.json").version')"
104
95
105
96
- name : Upload package
106
- uses : actions/upload-artifact@v1
97
+ uses : actions/upload-artifact@v4
107
98
with :
108
99
name : package
109
100
path : secp256k1-${{ steps.pkg-version.outputs.version }}.tgz
@@ -113,11 +104,11 @@ jobs:
113
104
runs-on : ubuntu-latest
114
105
steps :
115
106
- name : Fetch code
116
- uses : actions/checkout@v1
107
+ uses : actions/checkout@v4
117
108
with :
118
109
fetch-depth : 1
119
110
120
- - uses : actions/cache@v1
111
+ - uses : actions/cache@v4
121
112
id : cache
122
113
with :
123
114
path : clang
@@ -137,12 +128,10 @@ jobs:
137
128
runs-on : ubuntu-latest
138
129
steps :
139
130
- name : Fetch code
140
- uses : actions/checkout@v1
141
- with :
142
- fetch-depth : 1
131
+ uses : actions/checkout@v4
143
132
144
133
- name : Install dependencies
145
- run : yarn install --ignore-scripts
134
+ run : npm install --ignore-scripts
146
135
147
136
- name : Run lint command
148
137
run : make lint-js
0 commit comments