@@ -126,28 +126,18 @@ jobs:
126126 # pnpm has a known bug (pnpm/pnpm#9270) where file: protocol overrides
127127 # for packages with native optionalDependencies cause version mismatch
128128 # or silent registry fallback. Publishing to a local registry avoids this.
129- - name : Setup Verdaccio
129+ - name : Publish rspack to Verdaccio
130+ id : publish-rspack
130131 if : inputs.suite != '_selftest'
131- run : |
132- pnpm verdaccio --config verdaccio.yaml &
133- printf '\n//localhost:4873/:_authToken="this-is-a-fake-token"\n' >> ~/.npmrc
134- sleep 3
135- - name : Publish rspack packages to Verdaccio
136- if : inputs.suite != '_selftest'
137- working-directory : workspace/rspack
138- run : |
139- pnpm -r --filter "@rspack/binding*..." --filter "@rspack/core..." --filter "@rspack/test-tools..." \
140- exec sh -c 'jq "del(.publishConfig.provenance)" package.json > package.json.tmp && mv package.json.tmp package.json'
141- pnpm -r --filter "@rspack/binding*..." --filter "@rspack/core..." --filter "@rspack/test-tools..." \
142- publish --no-git-checks --provenance=false --access public --registry=http://localhost:4873
132+ uses : ./.github/actions/publish-rspack-to-verdaccio
143133 - name : Run suite (with Verdaccio)
144134 if : inputs.suite != '_selftest'
145135 run : >-
146136 NPM_CONFIG_REGISTRY=http://localhost:4873
147137 pnpm tsx ecosystem-ci.ts
148138 run-suites
149139 --stack rspack
150- --release "$(node -p "require('./workspace/ rspack/packages/rspack/package.json') .version") "
140+ --release "${{ steps.publish- rspack.outputs .version }} "
151141 --suite-${{ inputs.suiteRefType }} ${{ inputs.suiteRef }}
152142 ${{ inputs.suite }}
153143 - name : Run suite (selftest)
@@ -202,20 +192,10 @@ jobs:
202192 - run : pnpm i --frozen-lockfile
203193 - name : Expose GitHub Runtime
204194 uses : crazy-max/ghaction-github-runtime@v3
205- - name : Setup Verdaccio
195+ - name : Publish rspack to Verdaccio
196+ id : publish-rspack
206197 if : matrix.suite != '_selftest'
207- run : |
208- pnpm verdaccio --config verdaccio.yaml &
209- printf '\n//localhost:4873/:_authToken="this-is-a-fake-token"\n' >> ~/.npmrc
210- sleep 3
211- - name : Publish rspack packages to Verdaccio
212- if : matrix.suite != '_selftest'
213- working-directory : workspace/rspack
214- run : |
215- pnpm -r --filter "@rspack/binding*..." --filter "@rspack/core..." --filter "@rspack/test-tools..." \
216- exec sh -c 'jq "del(.publishConfig.provenance)" package.json > package.json.tmp && mv package.json.tmp package.json'
217- pnpm -r --filter "@rspack/binding*..." --filter "@rspack/core..." --filter "@rspack/test-tools..." \
218- publish --no-git-checks --provenance=false --access public --registry=http://localhost:4873
198+ uses : ./.github/actions/publish-rspack-to-verdaccio
219199 - name : Run suite (with Verdaccio)
220200 if : matrix.suite != '_selftest'
221201 run : |
@@ -226,7 +206,7 @@ jobs:
226206 NPM_CONFIG_REGISTRY=http://localhost:4873 \
227207 pnpm tsx ecosystem-ci.ts run-suites \
228208 --stack rspack \
229- --release "$(node -p "require('./workspace/ rspack/packages/rspack/package.json') .version") " \
209+ --release "${{ steps.publish- rspack.outputs .version }} " \
230210 "${suite_ref_args[@]}" \
231211 ${{ matrix.suite }}
232212 - name : Run suite (selftest)
0 commit comments