update
Some checks failed
Release / release (push) Failing after 1m1s

This commit is contained in:
zun.yang
2023-07-31 15:04:11 +08:00
parent 0cbf9a9f91
commit 5330264c6c
2 changed files with 16 additions and 1 deletions

View File

@ -3,7 +3,7 @@
dist: bin
builds:
- binary: semaphore
- binary: ssh-benchmark
env:
- CGO_ENABLED=0
main: main.go

View File

@ -19,14 +19,29 @@ tasks:
desc: Install all dependencies (except dredd requirements)
cmds:
- task: deps:be
- task: deps:tools
deps:be:
desc: application dependencies
cmds:
- go mod tidy
deps:tools:
desc: Installs tools needed for building
vars:
GORELEASER_VERSION: "0.183.0"
cmds:
- '{{ if ne OS "windows" }} sh -c "curl -L https://github.com/goreleaser/goreleaser/releases/download/v{{ .GORELEASER_VERSION }}/goreleaser_$(uname -s)_$(uname -m).tar.gz | tar -xz -C $(go env GOPATH)/bin goreleaser"{{ else }} {{ end }}'
- '{{ if ne OS "windows" }} chmod +x $(go env GOPATH)/bin/goreleaser{{ else }} {{ end }}'
- '{{ if eq OS "windows" }} echo "NOTICE: You must download goreleaser manually to build this application https://github.com/goreleaser/goreleaser/releases "{{ else }}:{{ end }}'
- '{{ if eq OS "windows" }} echo "NOTICE: You need to install golangci-lint manually to build this application https://github.com/golangci/golangci-lint#install"{{ else }}{{ end }}'
build:binary:
desc: Build a binary for the current architecture
platforms: [amd64]
cmds:
- env CGO_ENABLED=0 GOOS={{ .GOOS }} GOARCH={{ .GOARCH }} go build -o ./bin/{{.PROJECT_NAME}}{{ if eq OS "windows" }}.exe{{ end }}
release:prod:
cmds:
- goreleaser