From edde1ef9b02d831f73ca69a6fe0edc7929a483ed Mon Sep 17 00:00:00 2001 From: zhangtao25 Date: Tue, 17 Dec 2024 10:20:58 +0800 Subject: [PATCH] chore: daily development --- .github/workflows/generate-package-lock.yml | 38 +++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/generate-package-lock.yml diff --git a/.github/workflows/generate-package-lock.yml b/.github/workflows/generate-package-lock.yml new file mode 100644 index 00000000..a1514879 --- /dev/null +++ b/.github/workflows/generate-package-lock.yml @@ -0,0 +1,38 @@ +name: Generate pnpm-lock.yaml + +on: + push: + branches: + - main # 或者你希望触发的分支 + pull_request: + branches: + - main # 或者你希望触发的分支 + +jobs: + install-dependencies: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' # 设置你需要的 Node.js 版本,或者使用 .nvmrc 配置 + + - name: Install pnpm + run: | + npm install -g pnpm # 安装 pnpm + + - name: Install dependencies and generate pnpm-lock.yaml + run: | + pnpm install # 这会自动生成 pnpm-lock.yaml + + - name: Commit pnpm-lock.yaml + run: | + git config --global user.name "Allen Zhang" + git config --global user.email "wr.zhang25@gmail.com" + git add . + git commit -m "feat: update pnpm-lock.yaml" || echo "No changes to commit" + git push