From 79f9e19c128a4e86e19303294b636098150b48b2 Mon Sep 17 00:00:00 2001 From: Mohan Raj Date: Mon, 19 Feb 2024 16:07:49 +0000 Subject: [PATCH] new workflow for build --- .github/workflows/plugin-build.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin-build.yml b/.github/workflows/plugin-build.yml index edd8939..689af80 100644 --- a/.github/workflows/plugin-build.yml +++ b/.github/workflows/plugin-build.yml @@ -28,5 +28,21 @@ jobs: - name: Install dependencies run: composer install --no-dev -o - - name: Deploy to main-built branch - run: bash <(curl -s "https://raw.githubusercontent.com/Automattic/vip-go-build/master/deploy.sh") + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20.11 + + - name: Install packages + run: yarn install --immutable + + - name: JS build + run: yarn build + + - name: Create and push built branch + run: | + git checkout -b main-built + git add -A # Stage all changes, including untracked files + git ls-files --ignored --exclude-standard -o -z | xargs -0 git rm --cached # Remove ignored files from the index + git commit -m "Built WordPress plugin" + git push origin main-built