@@ -290,8 +290,8 @@ jobs:
290290 - name : Run e2e tests
291291 run : pnpm run test:e2e
292292
293- upload-build-stats-production :
294- name : Build and upload ${{ matrix.example }} stats data to production
293+ upload-example- build-stats-production :
294+ name : Build and upload ${{ matrix.example }} example stats data to production
295295 runs-on : ubuntu-latest
296296 needs : [install, unit-test, integration-test]
297297 strategy :
@@ -340,7 +340,7 @@ jobs:
340340 - name : Install built plugins
341341 run : pnpm install
342342
343- - name : Build ${{ matrix.example }} app for staging
343+ - name : Build ${{ matrix.example }} app for production
344344 working-directory : ./examples/${{ matrix.example }}
345345 env :
346346 NEXT_UPLOAD_TOKEN : ${{ secrets.CODECOV_ORG_TOKEN }}
@@ -353,8 +353,8 @@ jobs:
353353 WEBPACK_API_URL : ${{ secrets.CODECOV_API_URL }}
354354 run : pnpm run build
355355
356- upload-build-stats-staging :
357- name : Build and upload ${{ matrix.example }} stats data to staging
356+ upload-example- build-stats-staging :
357+ name : Build and upload ${{ matrix.example }} example stats data to staging
358358 runs-on : ubuntu-latest
359359 needs : [install, unit-test, integration-test]
360360 strategy :
@@ -415,3 +415,130 @@ jobs:
415415 WEBPACK_UPLOAD_TOKEN : ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
416416 WEBPACK_API_URL : ${{ secrets.CODECOV_STAGING_API_URL }}
417417 run : pnpm run build
418+
419+ upldate-plugin-stats-production :
420+ name : Build and upload ${{ matrix.package }} stats data to production
421+ runs-on : ubuntu-latest
422+ needs : [install, unit-test, integration-test]
423+ strategy :
424+ fail-fast : false
425+ matrix :
426+ package :
427+ [
428+ " bundler-plugin-core" ,
429+ " rollup-plugin" ,
430+ " vite-plugin" ,
431+ " webpack-plugin" ,
432+ ]
433+ steps :
434+ - name : Checkout
435+ uses : actions/checkout@v4
436+ with :
437+ fetch-depth : 0
438+
439+ - name : Setup node
440+ uses : actions/setup-node@v3
441+ with :
442+ node-version : 18
443+
444+ - name : Install pnpm
445+ uses : pnpm/action-setup@v2
446+ with :
447+ version : 8
448+ run_install : false
449+
450+ - name : Get pnpm store directory
451+ shell : bash
452+ run : |
453+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
454+
455+ - name : Cache node_modules
456+ id : cache-node-modules
457+ uses : actions/cache@v3
458+ env :
459+ cache-name : cache-codecov-js-bundle-plugin-node-modules
460+ with :
461+ path : ${{ env.STORE_PATH }}
462+ key : ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
463+ restore-keys : |
464+ ${{ runner.os }}-${{ env.cache-name }}-
465+
466+ - name : Install dependencies
467+ run : pnpm install
468+
469+ - name : Build plugins
470+ run : pnpm run build
471+
472+ - name : Install plugins
473+ run : pnpm install
474+
475+ - name : Build ${{ matrix.package }} to collect stats for production
476+ working-directory : ./packages/${{ matrix.package }}
477+ env :
478+ PLUGIN_CODECOV_TOKEN : ${{ secrets.CODECOV_ORG_TOKEN }}
479+ PLUGIN_CODECOV_API_URL : ${{ secrets.CODECOV_API_URL }}
480+ run : pnpm run build
481+
482+
483+ upldate-plugin-stats-staging :
484+ name : Build and upload ${{ matrix.package }} stats data to staging
485+ runs-on : ubuntu-latest
486+ needs : [install, unit-test, integration-test]
487+ strategy :
488+ fail-fast : false
489+ matrix :
490+ package :
491+ [
492+ " bundler-plugin-core" ,
493+ " rollup-plugin" ,
494+ " vite-plugin" ,
495+ " webpack-plugin" ,
496+ ]
497+ steps :
498+ - name : Checkout
499+ uses : actions/checkout@v4
500+ with :
501+ fetch-depth : 0
502+
503+ - name : Setup node
504+ uses : actions/setup-node@v3
505+ with :
506+ node-version : 18
507+
508+ - name : Install pnpm
509+ uses : pnpm/action-setup@v2
510+ with :
511+ version : 8
512+ run_install : false
513+
514+ - name : Get pnpm store directory
515+ shell : bash
516+ run : |
517+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
518+
519+ - name : Cache node_modules
520+ id : cache-node-modules
521+ uses : actions/cache@v3
522+ env :
523+ cache-name : cache-codecov-js-bundle-plugin-node-modules
524+ with :
525+ path : ${{ env.STORE_PATH }}
526+ key : ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
527+ restore-keys : |
528+ ${{ runner.os }}-${{ env.cache-name }}-
529+
530+ - name : Install dependencies
531+ run : pnpm install
532+
533+ - name : Build plugins
534+ run : pnpm run build
535+
536+ - name : Install plugins
537+ run : pnpm install
538+
539+ - name : Build ${{ matrix.package }} to collect stats for staging
540+ working-directory : ./packages/${{ matrix.package }}
541+ env :
542+ PLUGIN_CODECOV_TOKEN : ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
543+ PLUGIN_CODECOV_API_URL : ${{ secrets.CODECOV_STAGING_API_URL }}
544+ run : pnpm run build
0 commit comments