From 91c13d3551b7c78cc12cd2b3eb6c5b653c3a98fe Mon Sep 17 00:00:00 2001 From: Minghe Huang Date: Tue, 24 Oct 2023 14:43:47 +0800 Subject: [PATCH] chore(goreleaser): upgrade the goreleaser --- .goreleaser.yaml | 62 ++++++++++++++++++++++++++++++++++++++++++++++++ .goreleaser.yml | 34 -------------------------- 2 files changed, 62 insertions(+), 34 deletions(-) create mode 100644 .goreleaser.yaml delete mode 100644 .goreleaser.yml diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 00000000..25dc1efc --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,62 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com + +# The lines bellow 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 + +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + # you may remove this if you don't need go generate + - go generate ./... + +builds: + - env: + - CGO_ENABLED=0 + - GO111MODULE=on + main: fx.go + binary: fx + 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: + - README.md + +brews: + - homepage: "https://github.com/metrue/fx" + description: "fx, a simple but powerful Function as a Service build tools" + folder: Formula + commit_author: + name: metrue + email: h.minghe@gmail.com + repository: + owner: metrue + name: homebrew-fx + dependencies: + - docker + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" diff --git a/.goreleaser.yml b/.goreleaser.yml deleted file mode 100644 index 87d421ee..00000000 --- a/.goreleaser.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -env: - - GO111MODULE=on -builds: - - main: fx.go - binary: fx - goos: - - windows - - darwin - - linux - goarch: - - amd64 -# Archive customization -archives: - - - format: tar.gz - replacements: - amd64: 64-bit - darwin: macOS - linux: Tux - files: - - README.md -brews: - - homepage: "https://github.com/metrue/fx" - description: "fx, a simple but powerful Function as a Service build tools" - folder: Formula - commit_author: - name: metrue - email: h.minghe@gmail.com - tap: - owner: metrue - name: homebrew-fx - dependencies: - - docker