|
| 1 | +# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json |
| 2 | +project_name: atlas-cli-plugin-kubernetes |
| 3 | + |
| 4 | +version: 2 |
| 5 | + |
| 6 | +before: |
| 7 | + hooks: |
| 8 | + - go mod tidy |
| 9 | + - curl https://pgp.mongodb.com/atlas-cli.asc -o atlas-cli.asc |
| 10 | + |
| 11 | +builds: |
| 12 | + - <<: &build_defaults |
| 13 | + env: |
| 14 | + - CGO_ENABLED=0 |
| 15 | + binary: atlas-cli-plugin-kubernetes |
| 16 | + main: ./cmd/plugin |
| 17 | + ldflags: |
| 18 | + - -s -w -X github.com/mongodb/atlas-cli-plugin-kubernetes/internal/version.Version={{.Version}} -X github.com/mongodb/atlas-cli-plugin-kubernetes/internal/version.GitCommit={{.FullCommit}} |
| 19 | + id: linux |
| 20 | + goos: [linux] |
| 21 | + goarch: [amd64,arm64] |
| 22 | + - <<: *build_defaults |
| 23 | + id: macos |
| 24 | + goos: [darwin] |
| 25 | + goarch: [amd64,arm64] |
| 26 | + hooks: |
| 27 | + # This will notarize Apple binaries and replace goreleaser bins with the notarized ones |
| 28 | + post: |
| 29 | + - cmd: ./build/package/mac_notarize.sh |
| 30 | + output: true |
| 31 | + - <<: *build_defaults |
| 32 | + id: windows |
| 33 | + goos: [windows] |
| 34 | + goarch: [amd64] |
| 35 | + goamd64: [v1] |
| 36 | + hooks: |
| 37 | + # This will notarize the Windows binary and replace goreleaser bin with the notarized one |
| 38 | + post: |
| 39 | + - cmd: ./build/package/windows_notarize.sh |
| 40 | + output: true |
| 41 | +gomod: # https://goreleaser.com/customization/verifiable_builds/ |
| 42 | + # Proxy a module from proxy.golang.org, making the builds verifiable. |
| 43 | + # This will only be effective if running against a tag. Snapshots will ignore |
| 44 | + # this setting. |
| 45 | + # Notice: for this to work your `build.main` must be a package, not a `.go` file. |
| 46 | + proxy: false |
| 47 | + # Sets the `-mod` flag value. |
| 48 | + # |
| 49 | + # Since: v1.7 |
| 50 | + mod: mod |
| 51 | + |
| 52 | +archives: |
| 53 | +- id: linux |
| 54 | + name_template: atlas-cli-plugin-kubernetes_{{ .Version }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }} |
| 55 | + builds: [linux] |
| 56 | + <<: &archive_defaults |
| 57 | + files: |
| 58 | + - README.md |
| 59 | + - LICENSE |
| 60 | + - third_party_notices/**/* |
| 61 | + - src: "./manifest{{ if eq .Os \"windows\" }}.windows{{end}}.yml" |
| 62 | + dst: ./manifest.yml |
| 63 | + wrap_in_directory: true |
| 64 | + format: tar.gz |
| 65 | +- id: macos |
| 66 | + name_template: atlas-cli-plugin-kubernetes_{{ .Version }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }} |
| 67 | + builds: [macos] |
| 68 | + <<: *archive_defaults |
| 69 | + format: zip |
| 70 | + wrap_in_directory: false |
| 71 | +- id: windows |
| 72 | + name_template: atlas-cli-plugin-kubernetes_{{ .Version }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }} |
| 73 | + builds: [windows] |
| 74 | + <<: *archive_defaults |
| 75 | + wrap_in_directory: false |
| 76 | + format: zip |
| 77 | +checksum: |
| 78 | + name_template: checksums.txt |
| 79 | +signs: |
| 80 | + - id: all_artifacts |
| 81 | + signature: "${artifact}.sig" |
| 82 | + cmd: "./build/package/notarize.sh" |
| 83 | + ids: |
| 84 | + - linux |
| 85 | + - macos |
| 86 | + - windows |
| 87 | + artifacts: all |
| 88 | + output: true |
| 89 | +release: |
| 90 | + prerelease: auto |
| 91 | + name_template: "Atlas CLI Plugin Kubernetes v{{.Version}}" |
| 92 | + extra_files: |
| 93 | + - glob: ./*.asc |
0 commit comments