Skip to content

Commit

Permalink
feat(.github/actions): complete pnpm steps in .yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Iqro-dev committed Nov 24, 2024
1 parent 80adfc2 commit 13d731b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
29 changes: 19 additions & 10 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]"
}

0 comments on commit 13d731b

Please sign in to comment.