在 package.json 中新增 pnpm 作为包管理器,并更新 action.yml 中的步骤以优化 Node 和 PNPM 的设置

This commit is contained in:
严浩
2024-09-30 17:41:30 +08:00
parent e318325c78
commit 6f71017a40
2 changed files with 20 additions and 14 deletions

3
package.json Normal file
View File

@ -0,0 +1,3 @@
{
"packageManager": "pnpm@9.11.0"
}

View File

@ -11,29 +11,32 @@
# - name : 📦 Setup Node + PNPM + install deps
# uses: ./.github/actions/setup-node-pnpm-install
name: 'Setup Node + PNPM + Install Dependencies'
description: 'Setup Node + PNPM + Install Dependencies'
name: "Setup Node + PNPM + Install Dependencies"
description: "Setup Node + PNPM + Install Dependencies"
runs:
using: 'composite'
using: "composite"
steps:
- uses: actions/checkout@main
with:
# fetch-depth: 0 # zero stands for full checkout, which is required for semantic-release
filter: blob:none # we don't need all blobs, only the full tree
show-progress: false
- uses: pnpm/action-setup@v4
with:
version: latest
# version: latest
run_install: false
- uses: actions/setup-node@v4
with:
node-version: lts/*
# cache: 'pnpm'
- name: Check Node and PNPM versions
shell: bash
run: |
set -x
node --version
pnpm --version
pwd
ls -al
working-directory: ${{ github.workspace }}
# - name: Check Node and PNPM versions
# shell: bash
# run: |
# set -x
# node --version
# pnpm --version
# pwd
# ls -al
# - name: 📦 Install Project Dependencies
# run: pnpm install --frozen-lockfile
# shell: bash
# shell: bash