From 7497b20e662b92fd4a6cd3296d97d866d23ca739 Mon Sep 17 00:00:00 2001 From: figorr <77553975+figorr@users.noreply.github.com> Date: Sat, 22 Jun 2024 00:29:42 +0200 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f4c7370 --- /dev/null +++ b/.github/workflows/build.yml @@ -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'