Skip to content

Commit 9155970

Browse files
committed
ci: fix bundle generation with pnpm deploy
1 parent a8ce3aa commit 9155970

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/v-next-ci.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,21 @@ jobs:
108108
run: pnpm build
109109
# https://github.com/pnpm/pnpm/issues/6166
110110
- name: Deploy
111-
run: pnpm deploy --config.shamefully-hoist=true --config.hoist=true --config.node-linker=true --config.shared-workspace-lockfile=false --filter="$(jq -r .name package.json)" --prod --no-optional bundle
111+
run: |
112+
pnpm deploy --config.shamefully-hoist=true --config.hoist=true --config.node-linker=true --config.shared-workspace-lockfile=false --filter="$(jq -r .name package.json)" --prod --no-optional bundle
113+
# We need to move the node_modules links from v-next/hardhat/bundle to bundle because
114+
# https://github.com/pnpm/pnpm/pull/8465 broke modules generation with the set of options we provide
115+
for old_link in $(find v-next/hardhat/bundle -type l); do
116+
echo "Processing link $old_link"
117+
new_link="${old_link#v-next/hardhat/}"
118+
new_link_dir="$(dirname "$new_link")"
119+
old_link_target="$(readlink -f "$old_link")"
120+
mkdir -p "$new_link_dir"
121+
ln -rs "$old_link_target" "$new_link"
122+
new_link_target="$(readlink "$new_link")"
123+
echo "Created link $new_link -> $new_link_target"
124+
done
125+
rm -rf v-next
112126
- uses: actions/upload-artifact@v4
113127
with:
114128
name: ${{ matrix.package }}

0 commit comments

Comments
 (0)