Skip to content

Commit 9929a14

Browse files
committed
Fix pkg.pr.new
1 parent 6e98b92 commit 9929a14

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,8 @@ jobs:
471471
pkg-pr-new:
472472
needs:
473473
- build-compiler
474+
outputs:
475+
commit_sha: ${{ steps.publish.outputs.sha }}
474476
runs-on: ubuntu-24.04-arm
475477
steps:
476478
- name: Checkout
@@ -497,6 +499,7 @@ jobs:
497499
git diff --exit-code packages/artifacts.json
498500
499501
- name: Publish packages to pkg.pr.new
502+
id: publish
500503
run: |
501504
yarn dlx pkg-pr-new publish "." "./packages/@rescript/*"
502505
@@ -587,9 +590,9 @@ jobs:
587590
588591
- name: Install ReScript package
589592
run: |
590-
COMMIT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
593+
COMMIT_SHA="${{ needs.pkg-pr-new.outputs.commit_sha }}"
591594
npm i --no-audit \
592-
"https://pkg.pr.new/rescript-lang/rescript@${COMMIT_SHA::7}"
595+
"https://pkg.pr.new/rescript-lang/rescript@${COMMIT_SHA}"
593596
shell: bash
594597
working-directory: ${{ steps.tmp-dir.outputs.path }}
595598

@@ -641,8 +644,8 @@ jobs:
641644
642645
- name: Install ReScript package
643646
run: |
644-
COMMIT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
645-
pnpm i "https://pkg.pr.new/rescript-lang/rescript@${COMMIT_SHA::7}"
647+
COMMIT_SHA="${{ needs.pkg-pr-new.outputs.commit_sha }}"
648+
pnpm i "https://pkg.pr.new/rescript-lang/rescript@${COMMIT_SHA}"
646649
shell: bash
647650
working-directory: ${{ steps.tmp-dir.outputs.path }}
648651

@@ -676,8 +679,8 @@ jobs:
676679

677680
- name: Install ReScript package in rewatch/testrepo
678681
run: |
679-
COMMIT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
680-
yarn add "rescript@https://pkg.pr.new/rescript-lang/rescript@${COMMIT_SHA::7}"
682+
COMMIT_SHA="${{ needs.pkg-pr-new.outputs.commit_sha }}"
683+
yarn add "rescript@https://pkg.pr.new/rescript-lang/rescript@${COMMIT_SHA}"
681684
shell: bash
682685
working-directory: rewatch/testrepo
683686

0 commit comments

Comments
 (0)