Skip to content

Commit

Permalink
Add build script support to update-package action
Browse files Browse the repository at this point in the history
  • Loading branch information
anomiex committed Nov 30, 2020
1 parent 2477f88 commit 1d7ffab
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/actions/update-package/build-lazy-images.sh
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions .github/actions/update-package/update-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/update-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 1d7ffab

Please sign in to comment.