Skip to content

Commit

Permalink
Add build step to our zip action
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Jul 1, 2024
1 parent d6bc770 commit 0fe0b9a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build-release-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0fe0b9a

Please sign in to comment.