diff --git a/.gitignore b/.gitignore index 2b35ac2cb..bb5b6b266 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ bin/gh /gh-cli .envrc +/dist diff --git a/.goreleaser.yml b/.goreleaser.yml index 76449b88b..52496693a 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,14 +1,27 @@ # Make sure to check the documentation at http://goreleaser.com +project_name: gh before: hooks: - go mod tidy builds: - - binary: gh + - binary: bin/gh + ldflags: + - -s -w -X github.com/github/gh-cli/command.Version={{.Version}} -X github.com/github/gh-cli/command.BuildDate={{.Date}} goos: - linux - darwin + - windows goarch: - amd64 +archives: + - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" + wrap_in_directory: true + replacements: + darwin: macOS + format: tar.gz + format_overrides: + - goos: windows + format: zip changelog: sort: asc filters: