diff --git a/.gitignore b/.gitignore index 60fa9f0..6987934 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,6 @@ result-* # ---> ntfy-bridge /config.scfg + +# ---> goreleaser +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..ab24904 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,43 @@ +before: + hooks: + - go mod tidy + - go generate ./... +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 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' + +gitea_urls: + api: https://forge.babariviere.com/api/v1 + download: https://forge.babariviere.com + +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj diff --git a/flake.nix b/flake.nix index 7e97288..676f538 100644 --- a/flake.nix +++ b/flake.nix @@ -41,7 +41,7 @@ }; devShells.default = - pkgs.mkShell {buildInputs = with pkgs; [go gopls];}; + pkgs.mkShell {buildInputs = with pkgs; [go gopls goreleaser];}; }; flake = { }; diff --git a/go.sum b/go.sum index db251b4..f309877 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,4 @@ git.sr.ht/~emersion/go-scfg v0.0.0-20230828131541-76adf4aeafd7 h1:Cxfw56Srn4yJ2qPUuUvG9qQoQl45U7SsCjSmeTN63Xw= git.sr.ht/~emersion/go-scfg v0.0.0-20230828131541-76adf4aeafd7/go.mod h1:ybgvEJTIx5XbaspSviB3KNa6OdPmAZqDoSud7z8fFlw= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=