From 44f254e6006d36a035fba1a454fa69239e957f97 Mon Sep 17 00:00:00 2001 From: Ihor Sikachyna Date: Fri, 8 Nov 2024 12:43:56 -0500 Subject: [PATCH] Created goreleaser configuration --- .github/workflows/create-release.yml | 3 --- .gitignore | 3 ++- .goreleaser.yaml | 34 ++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 .goreleaser.yaml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 3ba50f2..9fc5d28 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -37,8 +37,5 @@ jobs: distribution: goreleaser version: '~> v2' args: release --clean - files: - - config.ini - - queries/*.ini env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3c8f8d3..2260f01 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .vscode -__debug* \ No newline at end of file +__debug* +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..c3f2844 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,34 @@ +version: 2 + +before: + hooks: + - go mod tidy + +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + +archives: + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of `uname`. + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + # use zip for windows archives + format_overrides: + - goos: windows + format: zip + files: + - config.ini + - queries/*.ini + +changelog: + sort: asc