sigs.k8s.io/kubebuilder/v3@v3.14.0/build/.goreleaser.yml (about)

     1  #  Copyright 2020 The Kubernetes Authors.
     2  #
     3  #  Licensed under the Apache License, Version 2.0 (the "License");
     4  #  you may not use this file except in compliance with the License.
     5  #  You may obtain a copy of the License at
     6  #
     7  #      http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  #  Unless required by applicable law or agreed to in writing, software
    10  #  distributed under the License is distributed on an "AS IS" BASIS,
    11  #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  #  See the License for the specific language governing permissions and
    13  #  limitations under the License.
    14  
    15  # This is a GoReleaser configuration file for Kubebuilder release.
    16  # Make sure to check the documentation at http://goreleaser.com
    17  
    18  # Global environment variables that are needed for hooks and builds.
    19  env:
    20    - GO111MODULE=on
    21  
    22  # Hooks to run before any build is run.
    23  before:
    24    hooks:
    25      - go mod download
    26  
    27  # Build a binary for each target in targets.
    28  builds:
    29    - id: kubebuilder
    30      main: ./cmd
    31      binary: kubebuilder
    32      mod_timestamp: "{{ .CommitTimestamp }}"
    33      ldflags:
    34        - -X main.kubeBuilderVersion={{ .Version }}
    35        - -X main.goos={{ .Os }}
    36        - -X main.goarch={{ .Arch }}
    37        - -X main.gitCommit={{ .Commit }}
    38        - -X main.buildDate={{ .Date }}
    39        - -X main.kubernetesVendorVersion={{ .Env.KUBERNETES_VERSION }}
    40      targets:
    41        - linux_amd64
    42        - linux_arm64
    43        - linux_ppc64le
    44        - linux_s390x
    45        - darwin_amd64
    46        - darwin_arm64
    47      env:
    48        - KUBERNETES_VERSION=1.27.1
    49        - CGO_ENABLED=0
    50  
    51  # Only binaries of the form "kubebuilder_${goos}_${goarch}" will be released.
    52  archives:
    53    - format: binary
    54      # Setting name_template correctly maps checksums to binary names.
    55      name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
    56  
    57  # Checksum all binaries.
    58  checksum:
    59    name_template: "checksums.txt"
    60  
    61  # kubebuilder uses a custom changelog, so leave this empty.
    62  changelog:
    63  
    64  # github.com/kubernetes-sigs/kubebuilder
    65  release:
    66    github:
    67      owner: kubernetes-sigs
    68      name: kubebuilder