Skip to content

Commit

Permalink
Create build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
figorr authored Jun 21, 2024
1 parent c9d4b1a commit 7497b20
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 'Build'

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: Build Main
runs-on: ubuntu-latest
env:
NODE_ENV: production
steps:
- uses: actions/checkout@v4

- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Build
run: |
rm -rf node_modules
npm install
npm run lint && npm run rollup -c rollup.config.js
ls -R dist
# Descomenta esta sección si necesitas la validación de HACS
# - name: HACS validation
# uses: 'hacs/action@main'
# with:
# category: 'plugin'

0 comments on commit 7497b20

Please sign in to comment.