@@ -438,7 +438,7 @@ jobs:
438
438
- build-compiler
439
439
- build-rewatch
440
440
441
- runs-on : ubuntu-24.04
441
+ runs-on : ubuntu-24.04-arm
442
442
443
443
steps :
444
444
- name : Checkout
@@ -447,29 +447,21 @@ jobs:
447
447
- name : Use Node.js
448
448
uses : actions/setup-node@v4
449
449
with :
450
- cache : yarn
451
450
node-version-file : .nvmrc
452
451
453
- - name : NPM install
454
- run : yarn install
455
-
456
452
- name : Download artifacts
457
453
uses : actions/download-artifact@v4
458
454
with :
459
455
pattern : " @(binaries-*|rewatch-*|lib-ocaml)"
460
456
461
- - name : Move artifacts
462
- run : ./scripts /moveArtifacts.sh
457
+ - name : Move artifacts into packages
458
+ run : .github/workflows /moveArtifacts.sh
463
459
464
- - name : npm pack (rescript) + check artifact list
460
+ - name : Check artifact list
465
461
run : node ./scripts/npmPack.js
466
462
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
473
465
474
466
- name : Prepare package upload
475
467
# For pull requests, pass the correct commit SHA explicitly as GITHUB_SHA points to the wrong commit.
@@ -482,6 +474,11 @@ jobs:
482
474
path : |
483
475
rescript-${{ env.rescript_version }}.tgz
484
476
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
485
482
486
483
outputs :
487
484
rescript_version : ${{ env.rescript_version }}
@@ -491,15 +488,19 @@ jobs:
491
488
strategy :
492
489
fail-fast : false
493
490
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
501
502
502
- runs-on : ${{matrix.os}}
503
+ runs-on : ${{ matrix.os }}
503
504
504
505
steps :
505
506
- name : Checkout
@@ -532,7 +533,8 @@ jobs:
532
533
- name : Install ReScript package
533
534
run : |
534
535
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
536
538
shell : bash
537
539
working-directory : ${{ steps.tmp-dir.outputs.path }}
538
540
@@ -546,7 +548,7 @@ jobs:
546
548
547
549
if : startsWith(github.ref, 'refs/tags/v')
548
550
549
- runs-on : ubuntu-24.04
551
+ runs-on : ubuntu-24.04-arm
550
552
551
553
steps :
552
554
- name : Checkout
@@ -568,8 +570,13 @@ jobs:
568
570
env :
569
571
NODE_AUTH_TOKEN : ${{ secrets.NPM_ACCESS_TOKEN }}
570
572
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
573
580
574
581
- name : Update Website Playground
575
582
env :
0 commit comments