github.com/SamarSidharth/kpt@v0.0.0-20231122062228-c7d747ae3ace/release/tag/goreleaser.yaml (about) 1 # Copyright 2019 The kpt 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 defines the build for goreleaser (https://goreleaser.com/). It is 16 # executed through a Github Action that is triggered by new tags being created 17 # in the kpt repo. 18 # As kpt needs to be compiled with CGO, we cannot simply just provide a simple 19 # matrix of GOOS and GOARCH combinations, but instead, we'd need to define separate 20 # steps for each targetted OS and ARCH. This is because we need to specify the 21 # platform specific C std library (libc) and cross-compiler to be used. 22 env: 23 - CGO_ENABLED=0 24 - GO111MODULE=on 25 builds: 26 - id: darwin-amd64 27 env: 28 - CGO_ENABLED=0 29 - GO111MODULE=on 30 goos: 31 - darwin 32 goarch: 33 - amd64 34 ldflags: -s -w -X github.com/GoogleContainerTools/kpt/run.version={{.Version}} 35 36 - id: darwin-arm64 37 env: 38 - CGO_ENABLED=0 39 - GO111MODULE=on 40 goos: 41 - darwin 42 goarch: 43 - arm64 44 ldflags: -s -w -X github.com/GoogleContainerTools/kpt/run.version={{.Version}} 45 46 - id: linux-amd64 47 env: 48 - CGO_ENABLED=0 49 - GO111MODULE=on 50 goos: 51 - linux 52 goarch: 53 - amd64 54 ldflags: -s -w -X github.com/GoogleContainerTools/kpt/run.version={{.Version}} -extldflags "-z noexecstack" 55 56 - id: linux-arm64 57 env: 58 - CGO_ENABLED=0 59 - GO111MODULE=on 60 goos: 61 - linux 62 goarch: 63 - arm64 64 ldflags: -s -w -X github.com/GoogleContainerTools/kpt/run.version={{.Version}} -extldflags "-z noexecstack" 65 66 dockers: 67 - ids: 68 - linux-amd64 69 image_templates: 70 - "gcr.io/kpt-dev/kpt:{{ .Tag }}" 71 dockerfile: "release/images/Dockerfile" 72 - ids: 73 - linux-amd64 74 image_templates: 75 - "gcr.io/kpt-dev/kpt-gcloud:{{ .Tag }}" 76 dockerfile: "release/images/Dockerfile-gcloud" 77 archives: 78 - id: archived 79 builds: 80 - darwin-amd64 81 - darwin-arm64 82 - linux-amd64 83 - linux-arm64 84 files: 85 - LICENSES* 86 - lib.zip* 87 name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}-{{ .Version }}" 88 - id: bin-only 89 format: binary 90 builds: 91 - darwin-amd64 92 - darwin-arm64 93 - linux-amd64 94 - linux-arm64 95 name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" 96 checksum: 97 name_template: "checksums.txt" 98 snapshot: 99 name_template: "master" 100 changelog: 101 sort: asc 102 filters: 103 exclude: 104 - "(?i)^docs:" 105 - "(?i)^test:" 106 - "(?i)^regenerate docs" 107 - Merge pull request 108 - Merge branch 109 release: 110 github: 111 owner: GoogleContainerTools 112 name: kpt 113 draft: false 114 prerelease: true