.goreleaser.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. ---
  2. project_name: govmomi
  3. builds:
  4. - id: govc
  5. no_main_check: true
  6. goos: &goos-defs
  7. - linux
  8. - darwin
  9. - windows
  10. - freebsd
  11. goarch: &goarch-defs
  12. - amd64
  13. - arm
  14. - arm64
  15. - mips64le
  16. - s390x
  17. env:
  18. - CGO_ENABLED=0
  19. - PKGPATH=github.com/vmware/govmomi/govc/flags
  20. main: ./govc/main.go
  21. binary: govc
  22. ldflags:
  23. - "-X {{.Env.PKGPATH}}.BuildVersion={{.Version}} -X {{.Env.PKGPATH}}.BuildCommit={{.ShortCommit}} -X {{.Env.PKGPATH}}.BuildDate={{.Date}}"
  24. - id: vcsim
  25. no_main_check: true
  26. goos: *goos-defs
  27. goarch: *goarch-defs
  28. env:
  29. - CGO_ENABLED=0
  30. main: ./vcsim/main.go
  31. binary: vcsim
  32. ldflags:
  33. - "-X main.buildVersion={{.Version}} -X main.buildCommit={{.ShortCommit}} -X main.buildDate={{.Date}}"
  34. nfpms:
  35. - package_name: govmomi
  36. builds:
  37. - govc
  38. - vcsim
  39. homepage: https://github.com/vmware/govmomi
  40. maintainer: Doug MacEachern <dougm@vmware.com>
  41. description: |-
  42. vSphere CLI
  43. formats:
  44. - rpm
  45. archives:
  46. - id: govcbuild
  47. builds:
  48. - govc
  49. name_template: >-
  50. govc_
  51. {{- title .Os }}_
  52. {{- if eq .Arch "amd64" }}x86_64
  53. {{- else if eq .Arch "386" }}i386
  54. {{- else }}{{ .Arch }}{{ end }}
  55. format_overrides: &overrides
  56. - goos: windows
  57. format: zip
  58. files: &extrafiles
  59. - CHANGELOG.md
  60. - LICENSE.txt
  61. - README.md
  62. - id: vcsimbuild
  63. builds:
  64. - vcsim
  65. name_template: >-
  66. vcsim_
  67. {{- title .Os }}_
  68. {{- if eq .Arch "amd64" }}x86_64
  69. {{- else if eq .Arch "386" }}i386
  70. {{- else }}{{ .Arch }}{{ end }}
  71. format_overrides: *overrides
  72. files: *extrafiles
  73. snapshot:
  74. name_template: "{{ .Tag }}-next"
  75. checksum:
  76. name_template: "checksums.txt"
  77. changelog:
  78. sort: asc
  79. filters:
  80. exclude:
  81. - "^docs:"
  82. - "^test:"
  83. - Merge pull request
  84. - Merge branch
  85. # upload disabled since it is maintained in homebrew-core
  86. brews:
  87. - name: govc
  88. ids:
  89. - govcbuild
  90. repository:
  91. owner: govmomi
  92. name: homebrew-tap
  93. # TODO: create token in specified tap repo, add as secret to govmomi repo and reference in release workflow
  94. # token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
  95. # enable once we do fully automated releases
  96. skip_upload: true
  97. commit_author:
  98. name: Alfred the Narwhal
  99. email: cna-alfred@vmware.com
  100. directory: Formula
  101. homepage: "https://github.com/vmware/govmomi/blob/main/govc/README.md"
  102. description: "govc is a vSphere CLI built on top of govmomi."
  103. test: |
  104. system "#{bin}/govc version"
  105. install: |
  106. bin.install "govc"
  107. - name: vcsim
  108. ids:
  109. - vcsimbuild
  110. repository:
  111. owner: govmomi
  112. name: homebrew-tap
  113. # TODO: create token in specified tap repo, add as secret to govmomi repo and reference in release workflow
  114. # token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
  115. # enable once we do fully automated releases
  116. skip_upload: true
  117. commit_author:
  118. name: Alfred the Narwhal
  119. email: cna-alfred@vmware.com
  120. directory: Formula
  121. homepage: "https://github.com/vmware/govmomi/blob/main/vcsim/README.md"
  122. description: "vcsim is a vSphere API simulator built on top of govmomi."
  123. test: |
  124. system "#{bin}/vcsim -h"
  125. install: |
  126. bin.install "vcsim"
  127. dockers:
  128. - image_templates:
  129. - "vmware/govc:{{ .Tag }}"
  130. - "vmware/govc:{{ .ShortCommit }}"
  131. - "vmware/govc:latest"
  132. dockerfile: Dockerfile.govc
  133. ids:
  134. - govc
  135. build_flag_templates:
  136. - "--pull"
  137. - "--label=org.opencontainers.image.created={{.Date}}"
  138. - "--label=org.opencontainers.image.title={{.ProjectName}}"
  139. - "--label=org.opencontainers.image.revision={{.FullCommit}}"
  140. - "--label=org.opencontainers.image.version={{.Version}}"
  141. - "--label=org.opencontainers.image.url=https://github.com/vmware/govmomi"
  142. - "--platform=linux/amd64"
  143. - image_templates:
  144. - "vmware/vcsim:{{ .Tag }}"
  145. - "vmware/vcsim:{{ .ShortCommit }}"
  146. - "vmware/vcsim:latest"
  147. dockerfile: Dockerfile.vcsim
  148. ids:
  149. - vcsim
  150. build_flag_templates:
  151. - "--pull"
  152. - "--label=org.opencontainers.image.created={{.Date}}"
  153. - "--label=org.opencontainers.image.title={{.ProjectName}}"
  154. - "--label=org.opencontainers.image.revision={{.FullCommit}}"
  155. - "--label=org.opencontainers.image.version={{.Version}}"
  156. - "--label=org.opencontainers.image.url=https://github.com/vmware/govmomi"
  157. - "--platform=linux/amd64"