github.com/cli/cli@v1.14.1-0.20210902173923-1af6a669e342/.goreleaser.yml (about)

     1  project_name: gh
     2  
     3  release:
     4    prerelease: auto
     5    draft: true # we only publish after the Windows MSI gets uploaded
     6    name_template: "GitHub CLI {{.Version}}"
     7  
     8  before:
     9    hooks:
    10      - go mod tidy
    11      - make manpages
    12  
    13  builds:
    14    - <<: &build_defaults
    15        binary: bin/gh
    16        main: ./cmd/gh
    17        ldflags:
    18          - -s -w -X github.com/cli/cli/internal/build.Version={{.Version}} -X github.com/cli/cli/internal/build.Date={{time "2006-01-02"}}
    19          - -X main.updaterEnabled=cli/cli
    20      id: macos
    21      goos: [darwin]
    22      goarch: [amd64]
    23  
    24    - <<: *build_defaults
    25      id: linux
    26      goos: [linux]
    27      goarch: [386, arm, amd64, arm64]
    28      env:
    29        - CGO_ENABLED=0
    30  
    31    - <<: *build_defaults
    32      id: windows
    33      goos: [windows]
    34      goarch: [386, amd64]
    35  
    36  archives:
    37    - id: nix
    38      builds: [macos, linux]
    39      <<: &archive_defaults
    40        name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
    41      wrap_in_directory: true
    42      replacements:
    43        darwin: macOS
    44      format: tar.gz
    45      files:
    46        - LICENSE
    47        - ./share/man/man1/gh*.1
    48    - id: windows
    49      builds: [windows]
    50      <<: *archive_defaults
    51      wrap_in_directory: false
    52      format: zip
    53      files:
    54        - LICENSE
    55  
    56  nfpms:
    57    - license: MIT
    58      maintainer: GitHub
    59      homepage: https://github.com/cli/cli
    60      bindir: /usr/bin
    61      dependencies:
    62        - git
    63      description: GitHub’s official command line tool.
    64      formats:
    65        - deb
    66        - rpm
    67      contents:
    68        - src: "./share/man/man1/gh*.1"
    69          dst: "/usr/share/man/man1"