github.com/ungtb10d/cli/v2@v2.0.0-20221110210412-98537dd9d6a1/.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 GH_VERSION={{.Version}}
    12  
    13  builds:
    14    - <<: &build_defaults
    15        binary: bin/gh
    16        main: ./cmd/gh
    17        ldflags:
    18          - -s -w -X github.com/ungtb10d/cli/v2/internal/build.Version={{.Version}} -X github.com/ungtb10d/cli/v2/internal/build.Date={{time "2006-01-02"}}
    19          - -X main.updaterEnabled=ungtb10d/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, arm64]
    35      hooks:
    36        post:
    37          - ./script/sign-windows-executable.sh '{{ .Path }}'
    38  
    39  archives:
    40    - id: nix
    41      builds: [macos, linux]
    42      <<: &archive_defaults
    43        name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
    44      wrap_in_directory: true
    45      replacements:
    46        darwin: macOS
    47      format: tar.gz
    48      files:
    49        - LICENSE
    50        - ./share/man/man1/gh*.1
    51    - id: windows
    52      builds: [windows]
    53      <<: *archive_defaults
    54      wrap_in_directory: false
    55      format: zip
    56      files:
    57        - LICENSE
    58  
    59  nfpms:
    60    - license: MIT
    61      maintainer: GitHub
    62      homepage: https://github.com/ungtb10d/cli
    63      bindir: /usr/bin
    64      dependencies:
    65        - git
    66      description: GitHub’s official command line tool.
    67      formats:
    68        - deb
    69        - rpm
    70      contents:
    71        - src: "./share/man/man1/gh*.1"
    72          dst: "/usr/share/man/man1"