This applies the changes from the separate Windows HSM signing prototype development to the official deployment workflow including: 1. Use of Azure Code Signing client 2. Sourcing signtool.exe from runner 3. Moving from batch to PowerShell for Windows signing script 4. Using the same signing process for .exe and .msi
98 lines
2.8 KiB
YAML
98 lines
2.8 KiB
YAML
project_name: gh
|
||
|
||
release:
|
||
prerelease: auto
|
||
draft: true # we only publish after the Windows MSI gets uploaded
|
||
name_template: "GitHub CLI {{.Version}}"
|
||
|
||
before:
|
||
hooks:
|
||
- >-
|
||
{{ if eq .Runtime.Goos "windows" }}echo{{ end }} make manpages GH_VERSION={{.Version}}
|
||
- >-
|
||
{{ if ne .Runtime.Goos "linux" }}echo{{ end }} make completions
|
||
|
||
builds:
|
||
- id: macos #build:macos
|
||
goos: [darwin]
|
||
goarch: [amd64, arm64]
|
||
hooks:
|
||
post:
|
||
- cmd: ./script/sign '{{ .Path }}'
|
||
output: true
|
||
binary: bin/gh
|
||
main: ./cmd/gh
|
||
ldflags:
|
||
- -s -w -X github.com/cli/cli/v2/internal/build.Version={{.Version}} -X github.com/cli/cli/v2/internal/build.Date={{time "2006-01-02"}}
|
||
|
||
- id: linux #build:linux
|
||
goos: [linux]
|
||
goarch: [386, arm, amd64, arm64]
|
||
env:
|
||
- CGO_ENABLED=0
|
||
binary: bin/gh
|
||
main: ./cmd/gh
|
||
ldflags:
|
||
- -s -w -X github.com/cli/cli/v2/internal/build.Version={{.Version}} -X github.com/cli/cli/v2/internal/build.Date={{time "2006-01-02"}}
|
||
|
||
- id: windows #build:windows
|
||
goos: [windows]
|
||
goarch: [386, amd64, arm64]
|
||
hooks:
|
||
post:
|
||
- cmd: >-
|
||
{{ if eq .Runtime.Goos "windows" }}pwsh .\script\sign.ps1{{ else }}./script/sign{{ end }} '{{ .Path }}'
|
||
output: true
|
||
binary: bin/gh
|
||
main: ./cmd/gh
|
||
ldflags:
|
||
- -s -w -X github.com/cli/cli/v2/internal/build.Version={{.Version}} -X github.com/cli/cli/v2/internal/build.Date={{time "2006-01-02"}}
|
||
|
||
archives:
|
||
- id: linux-archive
|
||
builds: [linux]
|
||
name_template: "gh_{{ .Version }}_linux_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
|
||
wrap_in_directory: true
|
||
format: tar.gz
|
||
rlcp: true
|
||
files:
|
||
- LICENSE
|
||
- ./share/man/man1/gh*.1
|
||
- id: macos-archive
|
||
builds: [macos]
|
||
name_template: "gh_{{ .Version }}_macOS_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
|
||
wrap_in_directory: true
|
||
format: zip
|
||
rlcp: true
|
||
files:
|
||
- LICENSE
|
||
- ./share/man/man1/gh*.1
|
||
- id: windows-archive
|
||
builds: [windows]
|
||
name_template: "gh_{{ .Version }}_windows_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
|
||
wrap_in_directory: false
|
||
format: zip
|
||
rlcp: true
|
||
files:
|
||
- LICENSE
|
||
|
||
nfpms: #build:linux
|
||
- license: MIT
|
||
maintainer: GitHub
|
||
homepage: https://github.com/cli/cli
|
||
bindir: /usr
|
||
dependencies:
|
||
- git
|
||
description: GitHub’s official command line tool.
|
||
formats:
|
||
- deb
|
||
- rpm
|
||
contents:
|
||
- src: "./share/man/man1/gh*.1"
|
||
dst: "/usr/share/man/man1"
|
||
- src: "./share/bash-completion/completions/gh"
|
||
dst: "/usr/share/bash-completion/completions/gh"
|
||
- src: "./share/fish/vendor_completions.d/gh.fish"
|
||
dst: "/usr/share/fish/vendor_completions.d/gh.fish"
|
||
- src: "./share/zsh/site-functions/_gh"
|
||
dst: "/usr/share/zsh/site-functions/_gh"
|