From d710e38ea25feac51d79eb65bc0df969dbbfb6da Mon Sep 17 00:00:00 2001 From: skanehira Date: Fri, 16 Aug 2024 00:38:51 +0900 Subject: [PATCH] chore: update goreleaser config --- .goreleaser.yaml | 44 ++++++++++++++++++++++++++++++++++++++++++++ .goreleaser.yml | 22 ---------------------- 2 files changed, 44 insertions(+), 22 deletions(-) create mode 100644 .goreleaser.yaml delete mode 100644 .goreleaser.yml diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..8606dc5 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,44 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com + +# The lines below are called `modelines`. See `:help modeline` +# Feel free to remove those if you don't want/need to use them. +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj + +version: 2 + +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + +builds: + - main: . + env: + - CGO_ENABLED=0 + ldflags: + - -s -w + - -X github.com/skanehira/rtty/cmd.Version={{.Version}} + - -X github.com/skanehira/rtty/cmd.Revision={{.ShortCommit}} + goos: + - linux + - 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 }} + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" diff --git a/.goreleaser.yml b/.goreleaser.yml deleted file mode 100644 index 58d7988..0000000 --- a/.goreleaser.yml +++ /dev/null @@ -1,22 +0,0 @@ -project_name: rtty -env: - - GO111MODULE=on -before: - hooks: - - go mod tidy -archives: - - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" - replacements: - darwin: Darwin - linux: Linux - 386: i386 - amd64: x86_64 -builds: - - main: . - ldflags: - - -s -w - - -X github.com/skanehira/rtty/cmd.Version={{.Version}} - - -X github.com/skanehira/rtty/cmd.Revision={{.ShortCommit}} - goos: - - linux - - darwin