-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLOUDP-245765: Add goreleaser to mongodb/openapi repo (#20)
- Loading branch information
1 parent
0fb7c3f
commit 3a78e3f
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Visit https://goreleaser.com for documentation on how to customize this | ||
# behavior. | ||
project_name: openapicli | ||
before: | ||
hooks: | ||
# this is just an example and not a requirement for provider building/publishing | ||
- go mod tidy | ||
builds: | ||
- <<: &build_defaults | ||
env: | ||
- CGO_ENABLED=0 | ||
binary: bin/openapicli | ||
main: ./cmd/openapicli.go | ||
ldflags: | ||
- -s -w -X github.com/mongodb/openapi/tools/cli/internal/version.Version={{.Version}} -X github.com/mongodb/openapi/tools/cli/internal/version.GitCommit={{.FullCommit}} | ||
id: linux | ||
goos: [linux] | ||
goarch: [amd64,arm64] | ||
- <<: *build_defaults | ||
id: macos | ||
goos: [darwin] | ||
goarch: [amd64,arm64] | ||
|
||
gomod: # https://goreleaser.com/customization/verifiable_builds/ | ||
# Proxy a module from proxy.golang.org, making the builds verifiable. | ||
# This will only be effective if running against a tag. Snapshots will ignore | ||
# this setting. | ||
# Notice: for this to work your `build.main` must be a package, not a `.go` file. | ||
proxy: false | ||
# Sets the `-mod` flag value. | ||
# | ||
# Since: v1.7 | ||
mod: mod | ||
|
||
archives: | ||
- id: linux_archives | ||
name_template: mongodb-openapi-cli_{{ .Version }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }} | ||
builds: [linux] | ||
wrap_in_directory: true | ||
format: tar.gz | ||
rlcp: false | ||
- id: macos | ||
name_template: mongodb-openapi-cli_{{ .Version }}_{{- if eq .Os "darwin" }}macos{{- else }}{{ .Os }}{{ end }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }} | ||
builds: [macos] | ||
format: zip | ||
wrap_in_directory: false | ||
rlcp: false | ||
|
||
snapshot: | ||
name_template: "{{ .Env.VERSION_GIT }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
- '^chore:' | ||
- '^build(deps):' | ||
|
||
release: | ||
prerelease: auto | ||
name_template: "OpenAPI CLI {{.Version}}" | ||
|
||
|