创建新仓库
This commit is contained in:
82
.drone.yml
Normal file
82
.drone.yml
Normal file
@ -0,0 +1,82 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
workspace:
|
||||
path: /app
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: alpine/git
|
||||
network_mode: host
|
||||
commands:
|
||||
- git clone --branch ${DRONE_TAG} --depth 1 http://192.168.110.199:3000/fengsen/4.0.git .
|
||||
|
||||
- name: build-linux
|
||||
image: docker.1ms.run/node:18.20.5
|
||||
volumes:
|
||||
- name: node_modules-linux
|
||||
path: /app/node_modules
|
||||
|
||||
- name: electron-builder-cache-linux
|
||||
path: /root/.cache/
|
||||
|
||||
- name: bin
|
||||
path: /app/bin
|
||||
|
||||
commands:
|
||||
- npm config set registry https://registry.npmmirror.com/
|
||||
- npm install
|
||||
- umask 0000
|
||||
- npm run build:linux64
|
||||
- export DRONE_TAG=${DRONE_TAG:-$(cat /proc/sys/kernel/random/uuid)}
|
||||
- /app/bin/cpl "$(find build/ -name "*.deb")" ${DRONE_TAG}
|
||||
|
||||
- name: build-windows-wine
|
||||
image: docker.1ms.run/electronuserland/builder:wine
|
||||
volumes:
|
||||
- name: node_modules-windows
|
||||
path: /app/node_modulesw
|
||||
|
||||
- name: electron-builder-cache-windows
|
||||
path: /root/.cache/
|
||||
|
||||
- name: bin
|
||||
path: /app/bin
|
||||
|
||||
commands:
|
||||
- npm config set registry https://registry.npmmirror.com/
|
||||
- npm install
|
||||
- npm run build:win64
|
||||
- export DRONE_TAG=${DRONE_TAG:-$(cat /proc/sys/kernel/random/uuid)}
|
||||
- /app/bin/cpl "$(find build/ -maxdepth 1 -name "*.exe")" ${DRONE_TAG}
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
ref:
|
||||
- refs/tags/**
|
||||
|
||||
volumes:
|
||||
# linux
|
||||
- name: node_modules-linux
|
||||
host:
|
||||
path: /home/abc/drone/yj/ci-cache/linux/node_modules
|
||||
- name: electron-builder-cache-linux
|
||||
host:
|
||||
path: /home/abc/drone/yj/ci-cache/linux/cache
|
||||
|
||||
# windows
|
||||
- name: node_modules-windows
|
||||
host:
|
||||
path: /home/abc/drone/yj/ci-cache/windows/node_modules
|
||||
- name: electron-builder-cache-windows
|
||||
host:
|
||||
path: /home/abc/drone/yj/ci-cache/windows/cache
|
||||
|
||||
- name: bin
|
||||
host:
|
||||
path: /home/abc/drone/bin
|
Reference in New Issue
Block a user