mirror of
https://github.com/xiaoqidun/goenv.git
synced 2024-11-22 08:06:46 +08:00
feat(构建脚本): 添加构建脚本
This commit is contained in:
parent
d1284d6df6
commit
609710a0eb
@ -4,15 +4,11 @@ type: docker
|
||||
name: goenv
|
||||
|
||||
steps:
|
||||
- name: build1
|
||||
pull: if-not-exists
|
||||
image: ghcr.io/xiaoqidun/build
|
||||
commands:
|
||||
- build -f build.sh -i goenv.go -o release/goenv
|
||||
- name: build2
|
||||
- name: build
|
||||
pull: if-not-exists
|
||||
image: xiaoqidun/goenv
|
||||
commands:
|
||||
- chmod +x build.sh
|
||||
- ./build.sh
|
||||
- name: upload
|
||||
pull: if-not-exists
|
||||
|
4
build.sh
Normal file
4
build.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o release/goenv_linux_amd64 -trimpath -ldflags '-s -w' goenv.go
|
||||
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -o release/goenv_darwin_amd64 -trimpath -ldflags '-s -w' goenv.go
|
||||
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o release/goenv_windows_amd64.exe -trimpath -ldflags '-s -w' goenv.go
|
Loading…
x
Reference in New Issue
Block a user