@@ -115,8 +115,6 @@ jobs:
115115
116116 - uses : pnpm/action-setup@v4
117117 if : ${{ matrix.native }}
118- with :
119- version : 9
120118
121119 - name : Install Node 20
122120 if : ${{ matrix.native }}
@@ -244,30 +242,55 @@ jobs:
244242 runs-on : ubuntu-latest
245243 needs : Build
246244 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-
254245 - uses : actions/checkout@v4
255246
256- - name : Place build
257- uses : actions/download-artifact@v4
258- with :
259- name : build
260- path : ./build
261-
262247 - name : Install Node
263248 uses : actions/setup-node@v4
264249 with :
265250 node-version-file : " ./.nvmrc"
266251
267252 - name : Install Pnpm
268253 uses : pnpm/action-setup@v4
254+
255+ - name : Download Artifacts
256+ uses : actions/download-artifact@v4
269257 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
271294
272295 - name : Pack Zeromq
273296 run : |
@@ -323,8 +346,6 @@ jobs:
323346 - name : Install Pnpm 9
324347 if : matrix.node-version == 22
325348 uses : pnpm/action-setup@v4
326- with :
327- version : 9
328349
329350 - uses : actions/checkout@v4
330351
0 commit comments