cli/.goreleaser.yml
Mislav Marohnić a983131479 Exercise most of the release process on prereleases
- deb and rpm packages are now built for prereleases
- consolidate setup for deb & rpm
- man pages are generated for prereleases
- the `cli.github.com` site is only pushed to on full releases

Bonus:
- only publish the GitHub release after the Windows MSI is uploaded
- hub does not need downloading
2020-09-07 16:11:27 +02:00

103 lines
2.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

project_name: gh
release:
prerelease: auto
draft: true # we only publish after the Windows MSI gets uploaded
before:
hooks:
- go mod tidy
- make manpages
builds:
- <<: &build_defaults
binary: bin/gh
main: ./cmd/gh
ldflags:
- -s -w -X github.com/cli/cli/command.Version={{.Version}} -X github.com/cli/cli/command.BuildDate={{time "2006-01-02"}}
- -X main.updaterEnabled=cli/cli
id: macos
goos: [darwin]
goarch: [amd64]
- <<: *build_defaults
id: linux
goos: [linux]
goarch: [386, amd64, arm64]
- <<: *build_defaults
id: windows
goos: [windows]
goarch: [386, amd64]
archives:
- id: nix
builds: [macos, linux]
<<: &archive_defaults
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
wrap_in_directory: true
replacements:
darwin: macOS
format: tar.gz
files:
- LICENSE
- ./share/man/man1/gh*.1
- id: windows
builds: [windows]
<<: *archive_defaults
wrap_in_directory: false
format: zip
files:
- LICENSE
brews:
- name: gh
ids: [nix]
github:
owner: github
name: homebrew-gh
skip_upload: auto
description: GitHub CLI
homepage: https://github.com/cli/cli
folder: Formula
custom_block: |
head do
url "https://github.com/cli/cli.git", :branch => "trunk"
depends_on "go"
end
install: |
system "make", "bin/gh", "manpages" if build.head?
bin.install "bin/gh"
man1.install Dir["./share/man/man1/gh*.1"]
(bash_completion/"gh.sh").write `#{bin}/gh completion -s bash`
(zsh_completion/"_gh").write `#{bin}/gh completion -s zsh`
(fish_completion/"gh.fish").write `#{bin}/gh completion -s fish`
test: |
help_text = shell_output("#{bin}/gh --help")
assert_includes help_text, "Usage:"
nfpms:
- license: MIT
maintainer: GitHub
homepage: https://github.com/cli/cli
bindir: /usr/local
dependencies:
- git
description: GitHubs official command line tool.
formats:
- deb
- rpm
files:
"./share/man/man1/gh*.1": "/usr/share/man/man1"
scoop:
bucket:
owner: cli
name: scoop-gh
commit_author:
name: vilmibm
email: vilmibm@github.com
homepage: https://github.com/cli/cli
skip_upload: auto
description: GitHub CLI
license: MIT