From e59bb0802088ffe953242a49d357f4a12f8936c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20L=C3=B3pez=20=C3=9Abeda?= Date: Mon, 2 Dec 2024 15:07:21 +0100 Subject: [PATCH] ci: fix setup-node for npm publish --- .github/workflows/release.yml | 3 --- .github/workflows/setup-node/action.yml | 9 +++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a95991..c2d66ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -80,8 +80,5 @@ jobs: git config --global user.name 'Devo GitHub Action' git config --global user.email 'desa@devo.com' - - name: Build - run: npm run build - - name: Publish ${{ github.event.inputs.version }}${{ github.event.inputs.dry == 'true' && ' (--dry-run)' || '' }} run: npm run release:ci -- ${{ github.event.inputs.version != 'auto' && github.event.inputs.version || '' }}${{ github.event.inputs.dry == 'true' && ' --dry-run' || '' }} diff --git a/.github/workflows/setup-node/action.yml b/.github/workflows/setup-node/action.yml index 1121cdd..62c8308 100644 --- a/.github/workflows/setup-node/action.yml +++ b/.github/workflows/setup-node/action.yml @@ -7,6 +7,8 @@ runs: uses: actions/setup-node@v4 with: node-version: 22 + cache: npm + registry-url: https://registry.npmjs.org/ - name: Cache dependencies ⚡ id: cache_dependencies @@ -15,6 +17,13 @@ runs: path: node_modules key: node-modules-${{ hashFiles('package-lock.json') }} + - name: Cache dist ⚡ + id: cache_dist + uses: actions/cache@v4 + with: + path: '**/dist' + key: dist-${{ github.sha }} + - name: Install dependencies 🔧 shell: bash if: steps.cache_dependencies.outputs.cache-hit != 'true'