From 717f0c3cba17ed3a0fa4937971521814a387c758 Mon Sep 17 00:00:00 2001 From: bilalcaliskan Date: Sun, 14 Jan 2024 15:55:49 +0300 Subject: [PATCH] ci: update goreleaser conf --- build/package/.goreleaser.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/build/package/.goreleaser.yaml b/build/package/.goreleaser.yaml index b79ac7d..3afb489 100644 --- a/build/package/.goreleaser.yaml +++ b/build/package/.goreleaser.yaml @@ -1,15 +1,12 @@ --- project_name: split-the-tunnel -variables: - versionDir: internal/version - module: github.com/bilalcaliskan/{{ .ProjectName }} - env: - CGO_ENABLED=0 - GO111MODULE=auto -# - VERSION_DIR=internal/version -# - MODULE=github.com/bilalcaliskan/{{ .ProjectName }} + - USERNAME=bilalcaliskan + - MODULE=github.com/bilalcaliskan/{{ .ProjectName }} + - VERSION_DIR=internal/version before: hooks: @@ -25,9 +22,9 @@ builds: - amd64 binary: "{{ .ProjectName }}" ldflags: - - -s -w -X {{ .Var.module }}/{{ .Var.versionDir }}.gitVersion={{ .Version }} - - -s -w -X {{ .Var.module }}/{{ .Var.versionDir }}.gitCommit={{ .ShortCommit }} - - -s -w -X {{ .Var.module }}/{{ .Var.versionDir }}.buildDate={{ .CommitDate }} + - -s -w -X {{ .Env.MODULE }}/{{ .Env.VERSION_DIR }}.gitVersion={{ .Version }} + - -s -w -X {{ .Env.MODULE }}/{{ .Env.VERSION_DIR }}.gitCommit={{ .ShortCommit }} + - -s -w -X {{ .Env.MODULE }}/{{ .Env.VERSION_DIR }}.buildDate={{ .CommitDate }} main: ./main.go archives: @@ -39,7 +36,7 @@ archives: release: github: - owner: bilalcaliskan + owner: "{{ .Env.USERNAME }}" name: "{{ .ProjectName }}" changelog: