Skip to content

Merge pull request #344 from 10up/fix/typo #29

Merge pull request #344 from 10up/fix/typo

Merge pull request #344 from 10up/fix/typo #29

name: Build release zip
on:
workflow_dispatch:
workflow_call:
push:
branches:
- trunk
permissions:
contents: read
jobs:
build:
name: Build release zip
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
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@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with:
node-version-file: '.nvmrc'
- name: Install Composer dependencies
run: composer install --no-dev
- name: Install Node dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm install
- name: Build plugin
run: npm run build
- name: Generate ZIP file
uses: 10up/action-wordpress-plugin-build-zip@b9e621e1261ccf51592b6f3943e4dc4518fca0d1 # v1.0.2