Skip to content

Commit e4f7aad

Browse files
committed
release binaries to github
1 parent 82b5894 commit e4f7aad

File tree

3 files changed

+79
-0
lines changed

3 files changed

+79
-0
lines changed

.drone.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
kind: pipeline
3+
name: default
4+
type: docker
5+
6+
platform:
7+
os: linux
8+
arch: amd64
9+
10+
steps:
11+
- name: fetch
12+
image: alpine/git
13+
commands:
14+
- git fetch --tags
15+
16+
- name: lint
17+
image: golangci/golangci-lint:v1.42.1
18+
commands:
19+
- golangci-lint run --no-config -v --timeout 10m ./...
20+
when:
21+
event:
22+
exclude:
23+
- tag
24+
25+
- name: release
26+
image: ghcr.io/goreleaser/goreleaser:v0.180.3
27+
commands:
28+
- goreleaser release --skip-announce
29+
environment:
30+
GITHUB_TOKEN:
31+
from_secret: github_token
32+
GOPROXY:
33+
from_secret: goproxy_url
34+
when:
35+
event: tag

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.idea/
2+
dist/

.goreleaser.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
project_name: docker-deploy
3+
4+
builds:
5+
- env:
6+
- CGO_ENABLED=0
7+
goos:
8+
- linux
9+
- windows
10+
- darwin
11+
goarch:
12+
- 386
13+
- amd64
14+
- arm64
15+
- arm
16+
flags:
17+
- -trimpath
18+
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}}
19+
20+
archives:
21+
- format: tar.gz
22+
wrap_in_directory: true
23+
format_overrides:
24+
- goos: windows
25+
format: zip
26+
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
27+
files:
28+
- LICENSE
29+
- README.md
30+
31+
checksum:
32+
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'
33+
34+
snapshot:
35+
name_template: SNAPSHOT-{{ .Commit }}
36+
37+
changelog:
38+
skip: true
39+
40+
release:
41+
github:
42+
owner: codestation
43+
name: docker-deploy

0 commit comments

Comments
 (0)