Skip to content

Commit

Permalink
Update goreleaser (#12)
Browse files Browse the repository at this point in the history
* update linux build

Signed-off-by: Vivek Kumar Sahu <vivekkumarsahu650@gmail.com>

* added go build for windows

Signed-off-by: Vivek Kumar Sahu <vivekkumarsahu650@gmail.com>

* add lfdflags  and changelog section

Signed-off-by: Vivek Kumar Sahu <vivekkumarsahu650@gmail.com>

* add rpm, deb, and apks for url_shortner packages

Signed-off-by: Vivek Kumar Sahu <vivekkumarsahu650@gmail.com>

---------

Signed-off-by: Vivek Kumar Sahu <vivekkumarsahu650@gmail.com>
  • Loading branch information
viveksahu26 authored Nov 28, 2023
1 parent f521496 commit a10c38c
Showing 1 changed file with 42 additions and 1 deletion.
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

0 comments on commit a10c38c

Please sign in to comment.