Skip to content

Generate ZIP file

Generate ZIP file #9

Workflow file for this run

name: Generate ZIP file
on:
workflow_dispatch:
workflow_call:
push:
branches:
- trunk
jobs:
generate-zip-file:
name: Generate ZIP file
runs-on: ubuntu-latest
steps:
- 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: Generate ZIP file
run: npm run build && rm -rf ./woocommerce-gateway-gocardless && unzip woocommerce-gateway-gocardless.zip -d ./woocommerce-gateway-gocardless
- name: Use the Upload Artifact GitHub Action
uses: actions/upload-artifact@v4
with:
name: woocommerce-gateway-gocardless
path: woocommerce-gateway-gocardless/