1+ # Visit https://goreleaser.com for documentation on how to customize this
2+ # behavior.
13version : 2
2-
3- # Archives section for creating the distribution files
4- archives :
5- - files :
6- - src : ' LICENSE'
7- dst : ' LICENSE.txt'
8- format : zip
9- name_template : ' {{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
10-
11- # Before build hooks (optional, used to download dependencies and prepare environment)
124before :
135 hooks :
14- - ' go mod download'
15-
16- # Build configuration for various OS and architecture targets
6+ # this is just an example and not a requirement for provider building/publishing
7+ - go mod tidy
178builds :
18- - binary : ' {{ .ProjectName }}_v{{ .Version }}_x5' # Binary name format
19- env :
20- - CGO_ENABLED=0 # Disable CGo for cross-platform compatibility
21- flags :
22- - -trimpath # Remove the file system paths from the final binary
23- goos :
24- - darwin
25- - freebsd
26- - linux
27- - windows
28- goarch :
29- - ' 386'
30- - amd64
31- - arm
32- - arm64
33- ignore :
34- - goarch : arm
35- goos : windows
36- - goarch : arm64
37- goos : freebsd
38- - goarch : arm64
39- goos : windows
40- ldflags :
41- - -s -w -X main.Version={{.Version}} # Set the version in the binary
42- mod_timestamp : ' {{ .CommitTimestamp }}' # Timestamp of commit for builds
43-
44- # Release section moved inside builds (if required in specific GoReleaser version)
45- release :
46- extra_files :
47- - glob : ' terraform-registry-manifest.json'
48- name_template : ' {{ .ProjectName }}_{{ .Version }}_manifest.json'
49- ids :
50- - none # Disable auto-ids for releases
51-
52- # Checksum generation configuration
9+ - env :
10+ # goreleaser does not work with CGO, it could also complicate
11+ # usage by users in CI/CD systems like HCP Terraform where
12+ # they are unable to install libraries.
13+ - CGO_ENABLED=0
14+ mod_timestamp : ' {{ .CommitTimestamp }}'
15+ flags :
16+ - -trimpath
17+ ldflags :
18+ - ' -s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
19+ goos :
20+ - freebsd
21+ - windows
22+ - linux
23+ - darwin
24+ goarch :
25+ - amd64
26+ - ' 386'
27+ - arm
28+ - arm64
29+ ignore :
30+ - goos : darwin
31+ goarch : ' 386'
32+ binary : ' {{ .ProjectName }}_v{{ .Version }}'
33+ archives :
34+ - format : zip
35+ name_template : ' {{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
5336checksum :
54- algorithm : sha256
5537 extra_files :
5638 - glob : ' terraform-registry-manifest.json'
5739 name_template : ' {{ .ProjectName }}_{{ .Version }}_manifest.json'
5840 name_template : ' {{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
59-
60- # Milestone to close issues or PRs after release
61- milestones :
62- - close : true
63-
64- # Signing configuration for checksums and the release artifacts
41+ algorithm : sha256
6542signs :
6643 - artifacts : checksum
6744 args :
68- # if you are using this is a GitHub action or some other automated pipeline, you
45+ # if you are using this in a GitHub action or some other automated pipeline, you
6946 # need to pass the batch flag to indicate its not interactive.
7047 - " --batch"
7148 - " --local-user"
@@ -74,7 +51,11 @@ signs:
7451 - " ${signature}"
7552 - " --detach-sign"
7653 - " ${artifact}"
77-
78- # Snapshot naming template for pre-release builds
79- snapshot :
80- name_template : " {{ .Tag }}-next"
54+ release :
55+ extra_files :
56+ - glob : ' terraform-registry-manifest.json'
57+ name_template : ' {{ .ProjectName }}_{{ .Version }}_manifest.json'
58+ # If you want to manually examine the release before its live, uncomment this line:
59+ # draft: true
60+ changelog :
61+ disable : true
0 commit comments