diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 95ddf55a..10d903d0 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -4,20 +4,29 @@ runs: using: 'composite' steps: - name: Setup node env 🏗 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' - - name: 'Cache Dependencies 🕓' - uses: 'actions/cache@v4' - id: cache-node-modules + - uses: pnpm/action-setup@v4 + name: Install pnpm with: - path: 'node_modules' - key: deps-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }} + run_install: false - - name: Install pnpm 👨🏻‍💻 - run: npm install -g pnpm + - name: Get pnpm store directory + id: pnpm-cache shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - name: Setup pnpm cache + uses: actions/cache@v3 + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install Dependencies 👨🏻‍💻 - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: pnpm install + run: pnpm install --no-frozen-lockfile shell: bash diff --git a/package.json b/package.json index 34ac289b..d74e7137 100644 --- a/package.json +++ b/package.json @@ -138,5 +138,13 @@ "type-fest": "^4.21.0", "vitest": "^2.0.4", "vitest-mock-extended": "^2.0.0" - } + }, + "engines": { + "node": "20.16.0", + "npm": "please-use-pnpm", + "yarn": "please-use-pnpm", + "bun": "please-use-pnpm", + "pnpm": "9.14.2" + }, + "packageManager": "pnpm@9.14.2" }