Skip to content

Commit 0fe0b9a

Browse files
committed
Add build step to our zip action
1 parent d6bc770 commit 0fe0b9a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/build-release-zip.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,29 @@ jobs:
1616
- name: Checkout
1717
uses: actions/checkout@v4
1818

19+
- name: Cache node_modules
20+
id: cache-node-modules
21+
uses: actions/cache@v4
22+
env:
23+
cache-name: cache-node-modules
24+
with:
25+
path: node_modules
26+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
27+
28+
- name: Setup node version and npm cache
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version-file: '.nvmrc'
32+
cache: 'npm'
33+
34+
- name: Install Node dependencies
35+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
36+
run: npm ci --no-optional
37+
38+
- name: Build plugin
39+
run: |
40+
npm run build
41+
1942
- name: Generate ZIP file
2043
uses: 10up/action-wordpress-plugin-build-zip@stable
2144
env:

0 commit comments

Comments
 (0)