@@ -115,8 +115,6 @@ jobs:
115
115
116
116
- uses : pnpm/action-setup@v4
117
117
if : ${{ matrix.native }}
118
- with :
119
- version : 9
120
118
121
119
- name : Install Node 20
122
120
if : ${{ matrix.native }}
@@ -244,30 +242,55 @@ jobs:
244
242
runs-on : ubuntu-latest
245
243
needs : Build
246
244
steps :
247
- - name : Merge Artifacts
248
- uses : actions/upload-artifact/merge@v4
249
- with :
250
- name : build
251
- pattern : build-*
252
- delete-merged : true
253
-
254
245
- uses : actions/checkout@v4
255
246
256
- - name : Place build
257
- uses : actions/download-artifact@v4
258
- with :
259
- name : build
260
- path : ./build
261
-
262
247
- name : Install Node
263
248
uses : actions/setup-node@v4
264
249
with :
265
250
node-version-file : " ./.nvmrc"
266
251
267
252
- name : Install Pnpm
268
253
uses : pnpm/action-setup@v4
254
+
255
+ - name : Download Artifacts
256
+ uses : actions/download-artifact@v4
269
257
with :
270
- version : 9
258
+ name : build
259
+ pattern : build-*
260
+ path : ./build-artifacts
261
+
262
+ - name : Create build directory
263
+ shell : bash
264
+ run : mkdir -p ./build
265
+
266
+ - name : Merge Manifests
267
+ shell : python
268
+ run : |
269
+ import json
270
+ import os
271
+ import sys
272
+
273
+ # Get the list of files in the build-artifacts directory
274
+ build_artifacts_dir = os.path.join(os.getcwd(), 'build-artifacts')
275
+ manifest_files = [os.path.join(build_artifacts_dir, f) for f in os.listdir(build_artifacts_dir) if f.endswith('.json')]
276
+ merged_manifest = {}
277
+ for file in manifest_files:
278
+ with open(file, 'r') as f:
279
+ manifest = json.load(f)
280
+ for key, value in manifest.items():
281
+ if key not in merged_manifest:
282
+ merged_manifest[key] = value
283
+ else:
284
+ merged_manifest[key] += value
285
+ with open('./build/manifest.json', 'w') as f:
286
+ json.dump(merged_manifest, f)
287
+
288
+ - name : Merge Artifacts
289
+ shell : bash
290
+ run : |
291
+ for folder in ./build-artifacts/*; do
292
+ mv "$folder" ./build/
293
+ done
271
294
272
295
- name : Pack Zeromq
273
296
run : |
@@ -323,8 +346,6 @@ jobs:
323
346
- name : Install Pnpm 9
324
347
if : matrix.node-version == 22
325
348
uses : pnpm/action-setup@v4
326
- with :
327
- version : 9
328
349
329
350
- uses : actions/checkout@v4
330
351
0 commit comments