Compare commits
2 Commits
8ece6b24e8
...
e7fc232ba7
| Author | SHA1 | Date | |
|---|---|---|---|
| e7fc232ba7 | |||
| 2b2e8ae481 |
37
.drone.yml
37
.drone.yml
@@ -7,56 +7,32 @@ platform:
|
|||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 恢复缓存
|
|
||||||
image: drillster/drone-volume-cache
|
|
||||||
volumes:
|
|
||||||
- name: cache
|
|
||||||
path: /cache
|
|
||||||
settings:
|
|
||||||
restore: true
|
|
||||||
mount:
|
|
||||||
- ./node_modules
|
|
||||||
- ./.pnpm-store
|
|
||||||
|
|
||||||
- name: 测试服-构建部署
|
- name: 测试服-构建部署
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
image: node:20-alpine
|
image: node:22-alpine
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- test
|
- test
|
||||||
commands:
|
commands:
|
||||||
- npm install -g pnpm
|
- npm install -g pnpm
|
||||||
- pnpm config set registry https://registry.npmmirror.com/
|
- pnpm config set registry https://registry.npmmirror.com/
|
||||||
- pnpm config set store-dir ./.pnpm-store
|
- pnpm install
|
||||||
- pnpm install --frozen-lockfile
|
|
||||||
- pnpm build:weapp:test:upload
|
- pnpm build:weapp:test:upload
|
||||||
- rm -rf dist.tar
|
- rm -rf dist.tar
|
||||||
|
|
||||||
- name: 正式服-构建部署
|
- name: 正式服-构建部署
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
image: node:20-alpine
|
image: node:22-alpine
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
commands:
|
commands:
|
||||||
- npm install -g pnpm
|
- npm install -g pnpm
|
||||||
- pnpm config set registry https://registry.npmmirror.com/
|
- pnpm config set registry https://registry.npmmirror.com/
|
||||||
- pnpm config set store-dir ./.pnpm-store
|
- pnpm install
|
||||||
- pnpm install --frozen-lockfile
|
|
||||||
- pnpm build:weapp:prod:upload
|
- pnpm build:weapp:prod:upload
|
||||||
- rm -rf dist.tar
|
- rm -rf dist.tar
|
||||||
|
|
||||||
- name: 重建缓存
|
|
||||||
image: drillster/drone-volume-cache
|
|
||||||
volumes:
|
|
||||||
- name: cache
|
|
||||||
path: /cache
|
|
||||||
settings:
|
|
||||||
rebuild: true
|
|
||||||
mount:
|
|
||||||
- ./node_modules
|
|
||||||
- ./.pnpm-store
|
|
||||||
|
|
||||||
- name: 企业微信通知
|
- name: 企业微信通知
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
image: plugins/webhook
|
image: plugins/webhook
|
||||||
@@ -84,8 +60,3 @@ steps:
|
|||||||
**详情**: [查看构建详情]({{ build.link }})"
|
**详情**: [查看构建详情]({{ build.link }})"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: cache
|
|
||||||
host:
|
|
||||||
path: /tmp/drone-cache
|
|
||||||
|
|||||||
Reference in New Issue
Block a user