File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
12kind : pipeline
23type : kubernetes
3- name : backend
4+ name : default
45
56steps :
67 - name : lint
78 image : golangci/golangci-lint:latest-alpine
89 commands :
910 - golangci-lint run --enable-all --disable gomnd
10- - name : test-build
11+ - name : test
1112 image : golang:1-alpine
1213 commands :
1314 - CGO_ENABLED=0 go test -json -coverprofile=coverage.out ./... >tests.json
14- - CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags="-s -w" .
15+ - name : build
16+ image : golang:1-alpine
17+ commands :
18+ - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-s -w" -o dist/github-latest_linux_amd64
19+ - CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -installsuffix cgo -ldflags="-s -w" -o dist/github-latest_linux_arm64
20+ - CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-s -w" -o dist/github-latest_darwin_amd64
21+ - CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-s -w" -o dist/github-latest_windows_amd64
22+ depends_on :
23+ - lint
24+ - test
25+ - name : publish
26+ image : plugins/github-release
27+ settings :
28+ api_key :
29+ from_secret : github_access_token
30+ files : dist/*
31+ checksum :
32+ - sha256
33+ title : ${DRONE_TAG}
34+ depends_on :
35+ - build
36+ when :
37+ event : tag
You can’t perform that action at this time.
0 commit comments