Skip to content

Commit

Permalink
feat: configure windows releaser to use a zip archive
Browse files Browse the repository at this point in the history
  • Loading branch information
phanyzewski committed Apr 15, 2023
1 parent 9c51444 commit cc26592
Showing 1 changed file with 63 additions and 2 deletions.
65 changes: 63 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
builds:
# You can have multiple builds defined as a yaml list
-
# ID of the build.
#
# Default: Binary name
id: windows

# Binary name.
# Can be a path (e.g. `bin/app`) to wrap the binary in a directory.
Expand All @@ -17,13 +21,52 @@ builds:
env:
- CGO_ENABLED=0

# GOOS list to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are darwin, linux, and windows.
goos:
- windows

# Custom ldflags templates.
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
ldflags:
- -s -w -X main.ClientVersion={{ .Version }} -X main.ClientName={{ .Env.NDT7_CLIENT_NAME }} -X main.HoneybadgerAPIKey={{ .Env.HONEYBADGER_API_KEY }}"

# GOARCH to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are 386, amd64 and arm64.
goarch:
- amd64
- arm
- arm64

-

# ID of the build.
#
# Default: Binary name
id: imup

# Binary name.
# Can be a path (e.g. `bin/app`) to wrap the binary in a directory.
# Default is the name of the project directory.
binary: imup

# Custom environment variables to be set during the builds.
#
# This field is templateable. Since v1.14.
#
# Invalid environment variables will be ignored.
#
# Default: `os.Environ()` merged with what you set the root `env` section.
env:
- CGO_ENABLED=0

# GOOS list to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are darwin, linux, and windows.
goos:
- linux
- windows
- darwin

# Custom ldflags templates.
Expand All @@ -40,11 +83,29 @@ builds:
- arm64

archives:
-
# Builds reference which build instances should be archived in this archive.
# Default is empty, which includes all builds.
builds:
- windows

# Default: 'tar.gz'
format: zip

# Archive name template.
# Defaults:
# - if format is `tar.gz`, `tar.xz`, `gz` or `zip`:
# - `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}`
# - if format is `binary`:
# - `{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}`
# name_template: "imup_{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"

-

# Builds reference which build instances should be archived in this archive.
# Default is empty, which includes all builds.
builds: []
builds:
- imup

# Archive name template.
# Defaults:
Expand Down

0 comments on commit cc26592

Please sign in to comment.