@@ -438,7 +438,7 @@ jobs:
438438 - build-compiler
439439 - build-rewatch
440440
441- runs-on : ubuntu-24.04
441+ runs-on : ubuntu-24.04-arm
442442
443443 steps :
444444 - name : Checkout
@@ -447,29 +447,21 @@ jobs:
447447 - name : Use Node.js
448448 uses : actions/setup-node@v4
449449 with :
450- cache : yarn
451450 node-version-file : .nvmrc
452451
453- - name : NPM install
454- run : yarn install
455-
456452 - name : Download artifacts
457453 uses : actions/download-artifact@v4
458454 with :
459455 pattern : " @(binaries-*|rewatch-*|lib-ocaml)"
460456
461- - name : Move artifacts
462- run : ./scripts /moveArtifacts.sh
457+ - name : Move artifacts into packages
458+ run : .github/workflows /moveArtifacts.sh
463459
464- - name : npm pack (rescript) + check artifact list
460+ - name : Check artifact list
465461 run : node ./scripts/npmPack.js
466462
467- - name : Copy JS files to stdlib package
468- run : mkdir -p packages/std/lib && cp -R lib/es6 lib/js packages/std/lib
469-
470- - name : npm pack (@rescript/std)
471- run : npm pack
472- working-directory : packages/std
463+ - name : yarn pack @rescript/* subpackages
464+ run : yarn workspaces foreach -W --no-private --exclude rescript pack
473465
474466 - name : Prepare package upload
475467 # For pull requests, pass the correct commit SHA explicitly as GITHUB_SHA points to the wrong commit.
@@ -482,6 +474,11 @@ jobs:
482474 path : |
483475 rescript-${{ env.rescript_version }}.tgz
484476 rescript-std-${{ env.rescript_version }}.tgz
477+ rescript-linux-x64-${{ env.rescript_version }}.tgz
478+ rescript-linux-arm64-${{ env.rescript_version }}.tgz
479+ rescript-darwin-x64-${{ env.rescript_version }}.tgz
480+ rescript-darwin-arm64-${{ env.rescript_version }}.tgz
481+ rescript-win32-x64-${{ env.rescript_version }}.tgz
485482
486483 outputs :
487484 rescript_version : ${{ env.rescript_version }}
@@ -491,15 +488,19 @@ jobs:
491488 strategy :
492489 fail-fast : false
493490 matrix :
494- os : [
495- macos-13, # x64
496- macos-14, # ARM
497- ubuntu-24.04,
498- ubuntu-24.04-arm,
499- windows-latest,
500- ]
491+ include :
492+ - os : macos-13 # x64
493+ target : darwin-x64
494+ - os : macos-14 # ARM
495+ target : darwin-arm64
496+ - os : ubuntu-24.04
497+ target : linux-x64
498+ - os : ubuntu-24.04-arm
499+ target : linux-arm64
500+ - os : windows-latest
501+ target : win32-x64
501502
502- runs-on : ${{matrix.os}}
503+ runs-on : ${{ matrix.os }}
503504
504505 steps :
505506 - name : Checkout
@@ -532,7 +533,8 @@ jobs:
532533 - name : Install ReScript package
533534 run : |
534535 npm i --ignore-scripts --no-audit \
535- rescript-${{ needs.package.outputs.rescript_version }}.tgz
536+ rescript-${{ needs.package.outputs.rescript_version }}.tgz \
537+ rescript-${{ matrix.target }}-${{ env.rescript_version }}.tgz
536538 shell : bash
537539 working-directory : ${{ steps.tmp-dir.outputs.path }}
538540
@@ -546,7 +548,7 @@ jobs:
546548
547549 if : startsWith(github.ref, 'refs/tags/v')
548550
549- runs-on : ubuntu-24.04
551+ runs-on : ubuntu-24.04-arm
550552
551553 steps :
552554 - name : Checkout
@@ -568,8 +570,13 @@ jobs:
568570 env :
569571 NODE_AUTH_TOKEN : ${{ secrets.NPM_ACCESS_TOKEN }}
570572 run : |
571- npm publish rescript-${{ needs.package.outputs.rescript_version }}.tgz --tag ci
572- npm publish rescript-std-${{ needs.package.outputs.rescript_version }}.tgz --tag ci
573+ npm publish --tag ci rescript-${{ needs.package.outputs.rescript_version }}.tgz
574+ npm publish --tag ci rescript-std-${{ needs.package.outputs.rescript_version }}.tgz
575+ npm publish --tag ci rescript-linux-x64-${{ needs.package.outputs.rescript_version }}.tgz
576+ npm publish --tag ci rescript-linux-arm64-${{ needs.package.outputs.rescript_version }}.tgz
577+ npm publish --tag ci rescript-darwin-x64-${{ needs.package.outputs.rescript_version }}.tgz
578+ npm publish --tag ci rescript-darwin-arm64-{{ needs.package.outputs.rescript_version }}.tgz
579+ npm publish --tag ci rescript-win32-x64-${{ needs.package.outputs.rescript_version }}.tgz
573580
574581 - name : Update Website Playground
575582 env :
0 commit comments