From 0fe0b9a8460200cdcc79032cb2d16dabe321a6ec Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Mon, 1 Jul 2024 08:25:32 -0600 Subject: [PATCH] Add build step to our zip action --- .github/workflows/build-release-zip.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/build-release-zip.yml b/.github/workflows/build-release-zip.yml index 79019ae..ffdb3b6 100644 --- a/.github/workflows/build-release-zip.yml +++ b/.github/workflows/build-release-zip.yml @@ -16,6 +16,29 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v4 + env: + cache-name: cache-node-modules + with: + path: node_modules + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + + - name: Setup node version and npm cache + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install Node dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: npm ci --no-optional + + - name: Build plugin + run: | + npm run build + - name: Generate ZIP file uses: 10up/action-wordpress-plugin-build-zip@stable env: