11name : publish-all-packages
22
33on :
4- push :
5- tags :
6- - " v*"
74 release :
85 types : [prereleased, published]
96 workflow_dispatch :
@@ -132,7 +129,7 @@ jobs:
132129 - name : Build certification and release metadata
133130 shell : bash
134131 run : |
135- ./scripts/ci/validate.sh
132+ bash ./scripts/ci/validate.sh
136133 while IFS= read -r package_dir; do
137134 python -m build --outdir dist "$package_dir"
138135 done < .artifacts/python-package-paths.txt
@@ -196,7 +193,7 @@ jobs:
196193 publish-python-testpypi :
197194 name : python-testpypi-publish
198195 needs : python-dist
199- if : ${{ github.event_name != 'workflow_dispatch' || (inputs.pypi_publish && inputs.package_selection != 'probes' && inputs.package_selection != 'wt-peer-probes') }}
196+ if : ${{ github.event_name == 'release' && github.event.release.prerelease && (github.event_name != 'workflow_dispatch' || (inputs.pypi_publish && inputs.package_selection != 'probes' && inputs.package_selection != 'wt-peer-probes') ) }}
200197 runs-on : ubuntu-latest
201198 environment : testpypi
202199 permissions :
@@ -209,7 +206,7 @@ jobs:
209206 name : python-dist-${{ github.sha }}
210207 path : dist
211208 - name : Publish Python distributions to TestPyPI
212- if : github.event_name != 'release' || github.event.release.prerelease || github.event.action == 'published'
209+ if : github.event_name == 'release' && github.event.release.prerelease
213210 uses : pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b
214211 with :
215212 repository-url : https://test.pypi.org/legacy/
@@ -219,7 +216,7 @@ jobs:
219216
220217 publish-python-pypi :
221218 name : python-pypi-publish
222- needs : publish- python-testpypi
219+ needs : python-dist
223220 if : ${{ (github.event_name != 'workflow_dispatch' || (inputs.pypi_publish && inputs.package_selection != 'probes' && inputs.package_selection != 'wt-peer-probes')) && (github.event_name != 'release' || github.event.release.prerelease == false) }}
224221 runs-on : ubuntu-latest
225222 environment : pypi
@@ -233,7 +230,7 @@ jobs:
233230 name : python-dist-${{ github.sha }}
234231 path : dist
235232 - name : Publish Python distributions to PyPI
236- if : github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false
233+ if : github.event_name == 'workflow_dispatch' || (github.event_name == ' release' && github.event.action == 'published' && github.event.release.prerelease == false)
237234 uses : pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b
238235 with :
239236 packages-dir : dist
@@ -250,14 +247,21 @@ jobs:
250247 steps :
251248 - name : Check out repository
252249 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
253- - name : Validate WebTransport peer probe package
254- uses : cobycloud/ actions/actions/ setup-node-project@master
250+ - name : Set up Node
251+ uses : actions/setup-node@v4
255252 with :
256253 node-version : " 22"
257- working-directory : packages/wt-peer-probes
258- install-command : npm ci --workspaces=false
259- build-command : npm run build --workspaces=false
260- test-command : npm test --workspaces=false
254+ cache : npm
255+ cache-dependency-path : packages/wt-peer-probes/package-lock.json
256+ - name : Install WebTransport peer probe dependencies
257+ working-directory : packages/wt-peer-probes
258+ run : npm ci --workspaces=false
259+ - name : Build WebTransport peer probe package
260+ working-directory : packages/wt-peer-probes
261+ run : npm run build --workspaces=false
262+ - name : Test WebTransport peer probe package
263+ working-directory : packages/wt-peer-probes
264+ run : npm test --workspaces=false
261265 - name : Pack WebTransport peer probe package
262266 working-directory : packages/wt-peer-probes
263267 run : npm pack
@@ -277,15 +281,28 @@ jobs:
277281 steps :
278282 - name : Check out repository
279283 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
280- - name : Validate browser WebTransport peer API probes
281- uses : cobycloud/ actions/actions/playwright-ci@master
284+ - name : Set up Node
285+ uses : actions/setup-node@v4
282286 with :
283287 node-version : " 22"
284- working-directory : packages/wt-peer-probes
285- install-command : npm ci --workspaces=false
286- browser-install-command : npx playwright install --with-deps chromium firefox webkit
287- test-command : npm run test:peer-api -- --reporter=line
288- artifact-name : wt-peer-probes-playwright-${{ github.sha }}
288+ cache : npm
289+ cache-dependency-path : packages/wt-peer-probes/package-lock.json
290+ - name : Install WebTransport peer probe dependencies
291+ working-directory : packages/wt-peer-probes
292+ run : npm ci --workspaces=false
293+ - name : Install Playwright browsers
294+ working-directory : packages/wt-peer-probes
295+ run : npx playwright install --with-deps chromium firefox webkit
296+ - name : Validate browser WebTransport peer API probes
297+ working-directory : packages/wt-peer-probes
298+ run : npm run test:peer-api -- --reporter=line
299+ - name : Upload WebTransport peer probe Playwright report
300+ if : always()
301+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
302+ with :
303+ name : wt-peer-probes-playwright-${{ github.sha }}
304+ path : packages/wt-peer-probes/playwright-report/
305+ if-no-files-found : ignore
289306
290307 publish-wt-peer-probes-github-release :
291308 name : wt-peer-probes-github-release
@@ -304,16 +321,15 @@ jobs:
304321 name : wt-peer-probes-${{ github.sha }}
305322 path : .artifacts/wt-peer-probes
306323 - name : Create or update GitHub release with probe package
307- uses : cobycloud/actions/actions/github- release@master
324+ uses : softprops/action-gh- release@153bb8e04406b158c6c84fc1615b65b24149a1fe
308325 with :
309- tag-name : ${{ github.ref_name }}
326+ tag_name : ${{ github.ref_name }}
310327 name : ${{ github.ref_name }}
311- body-path : RELEASE_NOTES_0.3.11 .md
328+ body_path : RELEASE_NOTES_0.3.12 .md
312329 files : .artifacts/wt-peer-probes/*.tgz
313- draft : " false"
330+ draft : false
314331 prerelease : ${{ github.event_name == 'release' && github.event.release.prerelease }}
315- make-latest : legacy
316- token : ${{ github.token }}
332+ make_latest : legacy
317333
318334 publish-wt-peer-probes-npmjs :
319335 name : wt-peer-probes-npmjs-publish
@@ -327,19 +343,34 @@ jobs:
327343 steps :
328344 - name : Check out repository
329345 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
330- - name : Publish WebTransport peer probe package
331- uses : cobycloud/ actions/actions/npm-publish@master
346+ - name : Set up Node
347+ uses : actions/setup-node@v4
332348 with :
333349 node-version : " 22"
334- package-directory : packages/wt-peer-probes
335- scope : " @tigrcorn"
336- npm-token : ${{ secrets.NPM_API_TOKEN }}
337- install-command : npm ci --workspaces=false
338- build-command : npm run build --workspaces=false
339- test-command : npm test --workspaces=false
340- access : public
341- provenance : " true"
342- dry-run : ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run }}
350+ registry-url : https://registry.npmjs.org
351+ cache : npm
352+ cache-dependency-path : packages/wt-peer-probes/package-lock.json
353+ - name : Install WebTransport peer probe dependencies
354+ working-directory : packages/wt-peer-probes
355+ run : npm ci --workspaces=false
356+ - name : Build WebTransport peer probe package
357+ working-directory : packages/wt-peer-probes
358+ run : npm run build --workspaces=false
359+ - name : Test WebTransport peer probe package
360+ working-directory : packages/wt-peer-probes
361+ run : npm test --workspaces=false
362+ - name : Publish WebTransport peer probe package to npm dry run
363+ if : ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run }}
364+ working-directory : packages/wt-peer-probes
365+ env :
366+ NODE_AUTH_TOKEN : ${{ secrets.NPM_API_TOKEN }}
367+ run : npm publish --access public --provenance --dry-run
368+ - name : Publish WebTransport peer probe package to npm
369+ if : ${{ github.event_name != 'workflow_dispatch' || !inputs.dry_run }}
370+ working-directory : packages/wt-peer-probes
371+ env :
372+ NODE_AUTH_TOKEN : ${{ secrets.NPM_API_TOKEN }}
373+ run : npm publish --access public --provenance
343374
344375 publish-python-github-release :
345376 name : python-github-release
0 commit comments