.goreleaser.yaml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # This is an example .goreleaser.yml file with some sensible defaults.
  2. # Make sure to check the documentation at https://goreleaser.com
  3. # The lines below are called `modelines`. See `:help modeline`
  4. # Feel free to remove those if you don't want/need to use them.
  5. # yaml-language-server: $schema=https://goreleaser.com/static/schema.json
  6. # vim: set ts=2 sw=2 tw=0 fo=cnqoj
  7. #version: 1
  8. env_files:
  9. # GoReleaser requires an API token with the 'repo' scope selected to deploy
  10. # the artifacts to GitHub. You can create one here
  11. # https://github.com/settings/tokens/new.
  12. github_token: ./github_token
  13. #before:
  14. # hooks:
  15. # # You may remove this if you don't use go modules.
  16. # - go mod tidy
  17. # # you may remove this if you don't need go generate
  18. # - go generate ./...
  19. #builds:
  20. # - binary:
  21. # timetracker
  22. # env:
  23. # - CGO_ENABLED=1
  24. # goos:
  25. # - windows
  26. # goarch:
  27. # - amd64
  28. # ldflags:
  29. # -s -w -X timetracker/cmd.BuildDateTime={{.Date}} -X timetracker/cmd.BuildVersion={{.Version}}
  30. archives:
  31. - format: tar.gz
  32. # this name template makes the OS and Arch compatible with the results of `uname`.
  33. name_template: >-
  34. {{ .ProjectName }}_
  35. {{- title .Os }}_
  36. {{- if eq .Arch "amd64" }}x86_64
  37. {{- else if eq .Arch "386" }}i386
  38. {{- else }}{{ .Arch }}{{ end }}
  39. {{- if .Arm }}v{{ .Arm }}{{ end }}
  40. # use zip for windows archives
  41. format_overrides:
  42. - goos: windows
  43. format: zip
  44. checksum:
  45. name_template: 'checksums.txt'
  46. snapshot:
  47. name_template: '{{ .Tag }}-next'
  48. changelog:
  49. use: github-native
  50. sort: asc
  51. release:
  52. draft: false
  53. replace_existing_draft: true