Skip to content

Commit

Permalink
ci: use pnpm/action-setup action (#797)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice authored Jun 27, 2024
1 parent afbe5e8 commit 8076bb4
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ runs:
using: 'composite'

steps:
- name: ⚙️ Enable Corepack
shell: bash
run: sudo corepack enable

- name: ⚙️ Calculate `CACHE_KEY`
shell: bash
run: |
Expand All @@ -36,16 +32,17 @@ runs:
(steps.node-modules-restore.outputs.cache-hit == 'true') && 'true' || ''
}}' >> "$GITHUB_ENV"
- name: ⚙️ Setup pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
standalone: true

- name: ⚙️ Setup Node.js ${{ inputs.node-version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: .node-version
cache: ${{ env.CACHE_HIT != 'true' && 'pnpm' || '' }}

- name: ⚙️ Enable Corepack
shell: bash
run: sudo corepack enable

- name: 📥 Install dependencies
if: env.CACHE_HIT != 'true'
shell: bash
Expand Down

0 comments on commit 8076bb4

Please sign in to comment.