Skip to content

Commit

Permalink
Add goreleaser snapshot (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
v-byte-cpu committed Apr 30, 2021
1 parent 29534c4 commit 4863304
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ clone:
steps:
- name: lint
image: golangci/golangci-lint:v1.39.0-alpine
volumes:
- name: deps
path: /go
commands:
- apk add libpcap-dev libc-dev linux-headers
- golangci-lint run -v
Expand All @@ -18,11 +21,30 @@ steps:

- name: test & build
image: golang:1.16-alpine
volumes:
- name: deps
path: /go
commands:
- apk add libpcap-dev libc-dev gcc linux-headers
- go test ./... -v -cover
- go build -ldflags "-w -s"

- name: goreleaser-snapshot
image: golang:1.16-alpine
volumes:
- name: deps
path: /go
commands:
- apk add libpcap-dev libc-dev gcc linux-headers curl git
- curl -s https://raw.githubusercontent.com/goreleaser/get/master/get > goreleaser.sh
- chmod +x goreleaser.sh && ./goreleaser.sh --snapshot
when:
event: push

volumes:
- name: deps
temp: {}

trigger:
branch:
- master
Expand Down
6 changes: 3 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ builds:
flags:
- -trimpath
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}}
- -linkmode external -extldflags '-static' -s -w -X main.version={{.Version}} -X main.commit={{.Commit}}
mod_timestamp: '{{ .CommitTimestamp }}'
hooks:
post: upx {{.Path}}
archives:
- files:
- none*
Expand All @@ -25,3 +23,5 @@ changelog:
exclude:
- '^docs:'
- '^test:'
- Merge pull request
- Update README

0 comments on commit 4863304

Please sign in to comment.