github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/release/tag/goreleaser.yaml (about) 1 # Copyright 2019 Google LLC 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=1 24 - GO111MODULE=on 25 builds: 26 - id: darwin-amd64 27 goos: 28 - darwin 29 goarch: 30 - amd64 31 env: 32 - CC=o64-clang 33 - CXX=o64-clang++ 34 ldflags: -s -w -X github.com/GoogleContainerTools/kpt/run.version={{.Version}} 35 36 - id: darwin-arm64 37 goos: 38 - darwin 39 goarch: 40 - arm64 41 env: 42 - CC=oa64-clang 43 - CXX=oa64-clang++ 44 ldflags: -s -w -X github.com/GoogleContainerTools/kpt/run.version={{.Version}} 45 46 - id: linux-amd64 47 goos: 48 - linux 49 goarch: 50 - amd64 51 env: 52 - CC=x86_64-linux-gnu-gcc 53 - CXX=x86_64-linux-gnu-g++ 54 ldflags: -s -w -X github.com/GoogleContainerTools/kpt/run.version={{.Version}} -linkmode external -extldflags "-static -z noexecstack" 55 56 - id: linux-arm64 57 goos: 58 - linux 59 goarch: 60 - arm64 61 env: 62 - CC=aarch64-linux-gnu-gcc 63 - CXX=aarch64-linux-gnu-g++ 64 ldflags: -s -w -X github.com/GoogleContainerTools/kpt/run.version={{.Version}} -linkmode external -extldflags "-static -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