From 61a1cf3ab0db4862fbc04f525b6388475566852c Mon Sep 17 00:00:00 2001 From: Dries De Peuter Date: Thu, 19 Jan 2023 15:48:56 +0100 Subject: [PATCH] fix: Better release --- .goreleaser.yml | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .goreleaser.yml diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..777cd2a --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,75 @@ +env: + - PROJECT_DESCRIPTION=Inject output of any command into markdown files + - PROJECT_HOMEPAGE=https://stenic.io + - LICENSE=MIT + +before: + hooks: + - go mod tidy +builds: +- env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + - windows + goarch: + - "386" + - amd64 + - arm + - arm64 + goarm: + - "6" + - "7" + mod_timestamp: '{{ .CommitTimestamp }}' + flags: + - -trimpath + ldflags: + - '{{ .Env.VEMBED }}' + +checksum: + name_template: 'checksums.txt' + +archives: + - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' + format_overrides: + - goos: windows + format: zip + files: + - README.md + - LICENSE + +brews: + - tap: + owner: stenic + name: homebrew-tap + folder: Formula + homepage: "{{ .Env.PROJECT_HOMEPAGE }}" + description: "{{ .Env.PROJECT_DESCRIPTION }}" + license: "{{ .Env.LICENSE }}" + test: | + system "#{bin}/{{ .ProjectName }} -v" + dependencies: [] + install: |- + bin.install "{{ .ProjectName }}" + +scoop: + bucket: + owner: stenic + name: scoop-bucket + homepage: "{{ .Env.PROJECT_HOMEPAGE }}" + description: "{{ .Env.PROJECT_DESCRIPTION }}" + license: "{{ .Env.LICENSE }}" + +nfpms: + - file_name_template: '{{ .ConventionalFileName }}' + id: packages + homepage: "{{ .Env.PROJECT_HOMEPAGE }}" + description: "{{ .Env.PROJECT_DESCRIPTION }}" + maintainer: Dries De Peuter + license: "{{ .Env.LICENSE }}" + vendor: Stenic + formats: + - apk + - deb + - rpm