Skip to content

Commit

Permalink
Add goreleaser configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
semihbkgr committed Jan 18, 2025
1 parent 0415754 commit 201e5f4
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
.idea

yamldiff

dist/
38 changes: 38 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
project_name: yamldiff

release:
github:
owner: semihbkgr
name: yamldiff

before:
hooks:
- go mod tidy

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
main: ./main.go
ldflags: -s -w
-X github.com/semihbkgr/yamldiff/cmd.buildVersion={{.Version}}
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ It can also be imported as a library in Go.
func main() {
left := []byte(`
name: Alice
city: New York
city: New York
items:
- one
- two
Expand Down

0 comments on commit 201e5f4

Please sign in to comment.