Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add releaser for pinttech #78

Merged
merged 1 commit into from
Jul 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 96 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,46 @@ builds:
- arm
- arm64

-
# ID of the build.
#
# Default: Binary name
id: windows-pinttech

# 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:
- 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 }} -X github.com/imup-io/client/config.ImUpAPIHost=https://api.pinttech.io"

# 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.
Expand Down Expand Up @@ -82,6 +122,48 @@ builds:
- arm
- arm64

-

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

# 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
- darwin

# 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 }} -X github.com/imup-io/client/config.ImUpAPIHost=https://api.pinttech.io"

# 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

archives:
-
id: windows
Expand All @@ -100,9 +182,15 @@ archives:
# - 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 }}"

-
id: windows-pinttech
builds:
- windows-pinttech

format: zip
name_template: 'pinttech_{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'

-
# Builds reference which build instances should be archived in this archive.
# Default is empty, which includes all builds.
builds:
Expand All @@ -118,6 +206,13 @@ archives:
# - `{{ .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:
- imup-pinttech

id: imup-pinttech
name_template: 'pinttech_{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'

release:
# What to do with the release notes in case there the release already exists.
#
Expand Down