diff --git a/.github/workflows/ci-bundle.yml b/.github/workflows/ci-bundle.yml new file mode 100644 index 00000000..2a7e6b91 --- /dev/null +++ b/.github/workflows/ci-bundle.yml @@ -0,0 +1,29 @@ +--- +name: CI-Bundle +permissions: + contents: read + +on: + workflow_call: + secrets: + CODECOV_TOKEN: + required: false + +jobs: + bundle_analysis: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Setup node + id: node + uses: actions/setup-node@v6 + + - name: Install npm dependencies + run: npm install + + - name: Build + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + run: npm run build diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 247da720..76ce9d94 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -12,9 +12,6 @@ on: release_version: required: true type: string - secrets: - CODECOV_TOKEN: - required: false jobs: build_windows: @@ -258,7 +255,6 @@ jobs: env: BRANCH: ${{ github.head_ref || github.ref_name }} BUILD_VERSION: ${{ inputs.release_version }} - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} COMMIT: ${{ inputs.release_commit }} run: | mkdir -p build diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8b71727..3ade9c22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,6 +118,11 @@ jobs: with: release_commit: ${{ needs.release-setup.outputs.release_commit }} release_version: ${{ needs.release-setup.outputs.release_version }} + + bundle-analysis: + name: Bundle Analysis + needs: release-setup + uses: ./.github/workflows/ci-bundle.yml secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/vite.config.js b/vite.config.js index 60bdc2a2..7bfc0cf8 100644 --- a/vite.config.js +++ b/vite.config.js @@ -55,9 +55,10 @@ export default defineConfig({ ViteEjsPlugin({ header }), // The Codecov vite plugin should be after all other plugins codecovVitePlugin({ - enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined, + enableBundleAnalysis: true, bundleName: "sunshine", uploadToken: process.env.CODECOV_TOKEN, + gitService: "github", }), ], root: resolve(assetsSrcPath),