@@ -108,7 +108,21 @@ jobs:
108
108
run : pnpm build
109
109
# https://github.com/pnpm/pnpm/issues/6166
110
110
- 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
112
126
- uses : actions/upload-artifact@v4
113
127
with :
114
128
name : ${{ matrix.package }}
@@ -135,7 +149,11 @@ jobs:
135
149
fi
136
150
shell : bash
137
151
- uses : actions/download-artifact@v4
152
+ - id : download
153
+ run : ls -1 | wc -l | xargs -I {} -0 echo "count={}" | tee -a $GITHUB_OUTPUT
154
+ shell : bash
138
155
- id : comment
156
+ if : steps.download.outputs.count != '0'
139
157
run : |
140
158
echo 'body<<EOF' >> $GITHUB_OUTPUT
141
159
for bundle in *; do
@@ -156,7 +174,7 @@ jobs:
156
174
echo '' | tee -a $GITHUB_OUTPUT
157
175
done
158
176
echo 'EOF' >> $GITHUB_OUTPUT
159
- - if : github.event_name == 'pull_request'
177
+ - if : github.event_name == 'pull_request' && steps.download.outputs.count != '0'
160
178
uses : marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2.9.0
161
179
with :
162
180
header : bundle
0 commit comments