Skip to content

Commit ad33dbf

Browse files
add default goreleaser
1 parent a6579a5 commit ad33dbf

File tree

3 files changed

+51
-1
lines changed

3 files changed

+51
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
**/.DS_Store
2-
.idea
2+
.idea
3+
dist/

.goreleaser.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This is an example .goreleaser.yml file with some sensible defaults.
2+
# Make sure to check the documentation at https://goreleaser.com
3+
before:
4+
hooks:
5+
# You may remove this if you don't use go modules.
6+
- go mod tidy
7+
# you may remove this if you don't need go generate
8+
- go generate ./...
9+
builds:
10+
- main: ./cmd/drexler/main.go
11+
env:
12+
- CGO_ENABLED=0
13+
goos:
14+
- linux
15+
- windows
16+
- darwin
17+
18+
archives:
19+
- format: tar.gz
20+
# this name template makes the OS and Arch compatible with the results of uname.
21+
name_template: >-
22+
{{ .ProjectName }}_
23+
{{- title .Os }}_
24+
{{- if eq .Arch "amd64" }}x86_64
25+
{{- else if eq .Arch "386" }}i386
26+
{{- else }}{{ .Arch }}{{ end }}
27+
{{- if .Arm }}v{{ .Arm }}{{ end }}
28+
# use zip for windows archives
29+
format_overrides:
30+
- goos: windows
31+
format: zip
32+
checksum:
33+
name_template: 'checksums.txt'
34+
snapshot:
35+
name_template: "{{ incpatch .Version }}-next"
36+
changelog:
37+
sort: asc
38+
filters:
39+
exclude:
40+
- '^docs:'
41+
- '^test:'
42+
43+
# The lines beneath this are called `modelines`. See `:help modeline`
44+
# Feel free to remove those if you don't want/use them.
45+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
46+
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ build:
55

66
deps:
77
go mod download
8+
9+
tidy:
10+
go mod tidy

0 commit comments

Comments
 (0)