chore(编译脚本): 添加CI自动编译脚本
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
xiaoqidun 2022-11-22 14:55:34 +08:00
parent 476779ebce
commit 95fa32b83e
2 changed files with 26 additions and 0 deletions

24
.drone.yml Normal file

@ -0,0 +1,24 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: build
pull: if-not-exists
image: hkccr.ccs.tencentyun.com/xiaoqidun/goenv
commands:
- chmod +x build.sh
- ./build.sh
- name: upload
image: hkccr.ccs.tencentyun.com/xiaoqidun/gocos
settings:
secret_id:
from_secret: cos_secret_id
secret_key:
from_secret: cos_secret_key
bucket_url:
from_secret: cos_bucket_url
source: release/
target: product/wslkd
strip_prefix: release/

2
build.sh Normal file

@ -0,0 +1,2 @@
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o release/wslkd_amd64.exe -trimpath -ldflags '-H windowsgui -s -w' wslkd.go
GOOS=windows GOARCH=arm64 CGO_ENABLED=0 go build -o release/wslkd_arm64.exe -trimpath -ldflags '-H windowsgui -s -w' wslkd.go