diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7a06bd8dc..c26b92918 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -441,7 +441,9 @@ jobs: - name: Set PUBLIC_URL run: echo "PUBLIC_URL=." >> $GITHUB_ENV - name: Build @stlite/mountable - run: make mountable + run: | + make mountable CRA_ARGS=--stats + mv build/bundle-stats.json bundle-stats.json - name: Package working-directory: packages/mountable @@ -461,6 +463,12 @@ jobs: path: packages/mountable/stlite-mountable-v*.tgz name: stlite-mountable-${{ github.ref_name }}.tgz + - name: Upload the Webpack stats JSON file as an artifact + uses: actions/upload-artifact@v3 + with: + path: packages/mountable/bundle-stats.json + name: mountable-bundle-stats.json + publish-mountable: if: ${{ !failure() && startsWith(github.ref, 'refs/tags/v') }} # `!failure()` is necessary to avoid skipping this job after successful build: https://github.com/actions/runner/issues/491 needs: [build-mountable] diff --git a/Makefile b/Makefile index 722207ab5..c81ffdacd 100644 --- a/Makefile +++ b/Makefile @@ -61,14 +61,14 @@ $(common-react): packages/common-react/src/*.ts yarn_install mountable: $(mountable) $(mountable): packages/mountable/src/*.ts packages/mountable/src/*.tsx $(kernel) $(common-react) cd packages/mountable; \ - yarn build + yarn build ${CRA_ARGS} @touch $@ .PHONY: sharing sharing: $(sharing) $(sharing): packages/sharing/src/*.ts packages/sharing/src/*.tsx $(kernel) $(sharing-common) $(common-react) yarn_install cd packages/sharing; \ - yarn build + yarn build ${CRA_ARGS} @touch $@ .PHONY: sharing-common @@ -82,14 +82,14 @@ $(sharing-common): packages/sharing-common/src/*.ts yarn_install sharing-editor: $(sharing-editor) $(sharing-editor): packages/sharing-editor/src/*.ts packages/sharing-editor/src/*.tsx $(common) $(sharing-common) yarn_install cd packages/sharing-editor; \ - yarn build + yarn build ${CRA_ARGS} @touch $@ .PHONY: desktop desktop: $(desktop) $(desktop): packages/desktop/src/*.ts packages/desktop/src/*.tsx packages/desktop/electron/*.ts $(kernel) $(common) $(common-react) yarn_install cd packages/desktop; \ - yarn build + yarn build ${CRA_ARGS} @touch $@ .PHONY: kernel