diff --git a/.github/actions/update-package/build-lazy-images.sh b/.github/actions/update-package/build-lazy-images.sh new file mode 100755 index 0000000000000..6c9231beb1452 --- /dev/null +++ b/.github/actions/update-package/build-lazy-images.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -eo pipefail + +# We want ./dist in the mirror, so remove it from .gitignore. +sed -i '/^dist$/d' .gitignore + +# Build JS. +yarn +yarn build diff --git a/.github/actions/update-package/update-package.sh b/.github/actions/update-package/update-package.sh index 7359a7271c1d0..6542d750c4907 100644 --- a/.github/actions/update-package/update-package.sh +++ b/.github/actions/update-package/update-package.sh @@ -66,6 +66,11 @@ for package in packages/*; do cp -r $BASE/packages/$NAME/. . + # Run package build script, if any. + if [[ -e $BASE/.github/actions/update-package/build-$NAME.sh ]]; then + $BASE/.github/actions/update-package/build-$NAME.sh + fi + # Before we commit any changes, ensure that the repo has the basics we need for any package. if $COMPOSER_JSON_EXISTED && [ ! -f "composer.json" ]; then echo " Those changes remove essential parts of the package. They will not be committed." diff --git a/.github/workflows/update-package.yml b/.github/workflows/update-package.yml index 89561f23249d4..9ce3234ddefd3 100644 --- a/.github/workflows/update-package.yml +++ b/.github/workflows/update-package.yml @@ -12,6 +12,11 @@ jobs: if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name steps: - uses: actions/checkout@master + + - name: Tool versions + run: | + yarn --version + - name: Keep Jetpack Packages up to date env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}