Skip to content

Fix: Minimize JS files [ED-16088] #1002

Fix: Minimize JS files [ED-16088]

Fix: Minimize JS files [ED-16088] #1002

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build_plugin:
name: Build theme
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm ci
- name: Bump version on push to release or develop
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/release/') || github.ref == 'refs/heads/develop')
run: |
npm config set git-tag-version false
if [ "${GITHUB_REF:11}" == "develop" ];
then npm version patch
fi
if [[ "${GITHUB_REF:11:7}" == "release" ]];
then npm version minor
fi
- name: Build
run: npm run zip
- name: Upload zip file to GitHub actions artifact
uses: actions/upload-artifact@v2
with:
name: hello-elementor
path: hello-elementor
retention-days: 7