Skip to content

Commit 09a1e25

Browse files
.goreleaser: add as per Terraform docs
Signed-off-by: Rohit Yadav <[email protected]>
1 parent f40dbdb commit 09a1e25

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.goreleaser.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
before:
19+
hooks:
20+
- go mod download
21+
- go mod tidy
22+
builds:
23+
- env:
24+
- CGO_ENABLED=0
25+
mod_timestamp: '{{ .CommitTimestamp }}'
26+
flags:
27+
- -trimpath
28+
ldflags:
29+
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
30+
goos:
31+
- linux
32+
- darwin
33+
- windows
34+
- freebsd
35+
- openbsd
36+
goarch:
37+
- amd64
38+
- '386'
39+
- arm64
40+
- arm
41+
ignore:
42+
- goos: darwin
43+
goarch: '386'
44+
- goos: openbsd
45+
goarch: arm
46+
- goos: openbsd
47+
goarch: arm64
48+
binary: '{{ .ProjectName }}_v{{ .Version }}'
49+
archives:
50+
- format: zip
51+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
52+
checksum:
53+
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
54+
algorithm: sha256
55+
signs:
56+
- artifacts: checksum
57+
args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]
58+
#release:
59+
# If you want to manually examine the release before its live, uncomment this line:
60+
# draft: true
61+
changelog:
62+
skip: true

0 commit comments

Comments
 (0)