mirror of
https://github.com/142vip/408CSFamily.git
synced 2026-02-02 18:20:26 +08:00
ci: 流水线新增缓存机制,优化依赖安装脚本
This commit is contained in:
14
.github/workflows/CD.yaml
vendored
14
.github/workflows/CD.yaml
vendored
@@ -30,16 +30,18 @@ jobs:
|
||||
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.20.2
|
||||
|
||||
- name: PNPM Install
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 7
|
||||
run_install: true
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.20.2
|
||||
cache: 'pnpm'
|
||||
run: |
|
||||
pnpm i --frozen-lockfile --registry https://registry.npmmirror.com
|
||||
|
||||
- name: Cache Dependencies
|
||||
uses: actions/cache@v3
|
||||
|
||||
14
.github/workflows/CI.yml
vendored
14
.github/workflows/CI.yml
vendored
@@ -34,16 +34,18 @@ jobs:
|
||||
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.20.2
|
||||
|
||||
- name: PNPM Install
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 7
|
||||
run_install: true
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.20.2
|
||||
cache: 'pnpm'
|
||||
run: |
|
||||
pnpm i --frozen-lockfile --registry https://registry.npmmirror.com
|
||||
|
||||
- name: Cache Dependencies
|
||||
uses: actions/cache@v3
|
||||
|
||||
4
scripts/ci
Normal file
4
scripts/ci
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
## 下载依赖
|
||||
pnpm i --frozen-lockfile --registry https://registry.npmmirror.com
|
||||
@@ -7,7 +7,7 @@
|
||||
##
|
||||
|
||||
## 利用commit-and-tag-version生成changelog文档,并跳过commit、tag操作
|
||||
readonly generateChangeLog='pnpm commit-and-tag-version && git add CHANGELOG.md'
|
||||
readonly generateChangeLog='commit-and-tag-version && git add CHANGELOG.md'
|
||||
## git提交信息
|
||||
readonly commitInfo='chore(release): publish v%s'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user