Skip to content

chore: update dependencies #24

chore: update dependencies

chore: update dependencies #24

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 --no-frozen-lockfile # ่ฟ™ไผš่‡ชๅŠจ็”Ÿๆˆ 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