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

Update goreleaser #12

Merged
merged 4 commits into from
Nov 28, 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
43 changes: 42 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,32 @@ sboms:
- artifacts: binary

builds:
- id: url_shortner
- id: linux-amd64
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
binary: url_shortner-linux-{{ .Arch }}
main: ./main.go
no_unique_dist_dir: true

- id: windows-amd64
goos:
- windows
goarch:
- amd64
ldflags:
- -buildmode=exe
- -s -w
-X "github.com/viveksahu26/url_shortner/buildversion.BuildVersion={{.Version}}"
-X "github.com/viveksahu26/url_shortner/buildversion.BuildTime={{time "2006-01-02T15:04:05Z07:00"}}"
-X "github.com/viveksahu26/url_shortner/buildversion.BuildCommit={{.FullCommit}}"
binary: url_shortner-windows-{{ .Arch }}
main: ./main.go
no_unique_dist_dir: true


archives:
- format: binary
Expand All @@ -33,3 +52,25 @@ archives:
checksum:
name_template: "{{ .ProjectName }}_checksums.txt"

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

nfpms:
- id: url_shortner
package_name: url_shortner
file_name_template: "{{ .ConventionalFileName }}"
vendor: viveksahu26
homepage: https://github.com/viveksahu26/
maintainer: viveksahu26
builds:
- linux
description: It primarily used for converting long URL into short
license: "Apache License 2.0"
formats:
- apk
- deb
- rpm