Skip to content

Commit

Permalink
chore: daily development
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Dec 17, 2024
1 parent 8afbfd3 commit edde1ef
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/generate-package-lock.yml
Original file line number Diff line number Diff line change
@@ -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 "[email protected]"
git add .
git commit -m "feat: update pnpm-lock.yaml" || echo "No changes to commit"
git push

0 comments on commit edde1ef

Please sign in to comment.