cli/.goreleaser.yml

154 lines
4.3 KiB
YAML
Raw Normal View History

2020-07-29 05:08:02 +00:00
project_name: glab
2020-10-01 12:47:19 +00:00
release:
prerelease: auto
2022-12-01 23:54:33 +00:00
extra_files:
- glob: "./bin/*.exe"
2022-07-13 17:06:30 +00:00
2020-07-29 05:08:02 +00:00
before:
hooks:
2020-10-19 09:42:29 +00:00
- go mod tidy
2021-05-30 18:58:18 +00:00
- make manpage
2022-07-13 17:06:30 +00:00
2020-07-29 05:08:02 +00:00
builds:
- <<: &build_defaults
2020-07-29 05:27:46 +00:00
main: ./cmd/glab
binary: bin/glab
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X main.version=v{{.Version}} -X main.build={{time "2006-01-02"}}
2020-07-29 05:08:02 +00:00
id: macos
goos: [darwin]
goarch: [amd64, arm64]
2020-07-29 05:08:02 +00:00
- <<: *build_defaults
id: linux
goos: [linux]
2022-07-13 17:06:30 +00:00
goarch: ["386", arm, amd64, arm64]
2020-07-29 05:08:02 +00:00
- <<: *build_defaults
id: windows
goos: [windows]
2022-07-13 17:06:30 +00:00
goarch: ["386", amd64]
2020-07-31 06:36:23 +00:00
2021-06-08 02:55:18 +00:00
dockers:
- image_templates:
2022-07-13 17:06:30 +00:00
- "registry.gitlab.com/gitlab-org/cli:{{ .Tag }}-amd64"
- "gitlab/glab:{{ .Tag }}-amd64"
2021-06-08 02:55:18 +00:00
dockerfile: Dockerfile
use: buildx
2021-06-08 02:55:18 +00:00
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
extra_files:
- scripts/entrypoint.sh
2021-06-08 05:19:44 +00:00
- image_templates:
2022-07-13 17:06:30 +00:00
- "registry.gitlab.com/gitlab-org/cli:{{ .Tag }}-arm64"
- "gitlab/glab:{{ .Tag }}-arm64"
2021-06-08 05:19:44 +00:00
dockerfile: Dockerfile
use: buildx
2021-06-08 05:19:44 +00:00
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64"
goarch: arm64
extra_files:
- scripts/entrypoint.sh
2021-06-08 02:55:18 +00:00
docker_manifests:
2022-07-13 17:06:30 +00:00
- name_template: "registry.gitlab.com/gitlab-org/cli:{{ .Tag }}"
2021-06-08 05:19:44 +00:00
image_templates:
2022-07-13 17:06:30 +00:00
- "registry.gitlab.com/gitlab-org/cli:{{ .Tag }}-amd64"
- "registry.gitlab.com/gitlab-org/cli:{{ .Tag }}-arm64"
- name_template: "registry.gitlab.com/gitlab-org/cli:latest"
2021-06-08 02:55:18 +00:00
image_templates:
2022-07-13 17:06:30 +00:00
- "registry.gitlab.com/gitlab-org/cli:{{ .Tag }}-amd64"
- "registry.gitlab.com/gitlab-org/cli:{{ .Tag }}-arm64"
- name_template: "gitlab/glab:{{ .Tag }}"
image_templates:
- "gitlab/glab:{{ .Tag }}-amd64"
- "gitlab/glab:{{ .Tag }}-arm64"
- name_template: "gitlab/glab:latest"
image_templates:
- "gitlab/glab:{{ .Tag }}-amd64"
- "gitlab/glab:{{ .Tag }}-arm64"
2020-07-29 05:08:02 +00:00
archives:
2020-07-31 06:36:23 +00:00
- id: nix
2020-08-04 17:21:50 +00:00
builds: [macos, linux]
2020-07-31 06:36:23 +00:00
<<: &archive_defaults
name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- if eq .Os "darwin" }}macOS
{{- else if eq .Os "linux" }}Linux
{{- else if eq .Os "windows" }}Windows{{ end }}_
{{- if eq .Arch "386" }}i386
{{- else if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "arm" }}arm
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
wrap_in_directory: false
format: tar.gz
2020-07-31 06:36:23 +00:00
- id: windows
builds: [windows]
<<: *archive_defaults
format: zip
2020-08-05 00:42:32 +00:00
nfpms:
2022-07-13 17:06:30 +00:00
- id: foo
2020-08-05 00:42:32 +00:00
package_name: glab
file_name_template: >-
{{ .ProjectName }}_
{{- .Version }}_
{{- if eq .Os "darwin" }}macOS
{{- else if eq .Os "linux" }}Linux{{ end }}_
{{- if eq .Arch "386" }}i386
{{- else if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
2020-08-05 00:42:32 +00:00
# Build IDs for the builds you want to create NFPM packages for.
# Defaults to all builds.
2022-07-13 17:06:30 +00:00
vendor: GitLab
homepage: https://gitlab.com/gitlab-org/cli
# using service-desk email https://docs.gitlab.com/ee/user/project/service_desk.html
maintainer: GitLab<contact-project+gitlab-org-cli-34675721-issue-@incoming.gitlab.com>
description: An open source GitLab CLI tool
2020-08-05 00:42:32 +00:00
license: MIT
formats:
2021-05-30 18:58:18 +00:00
- apk
2020-08-05 00:42:32 +00:00
- deb
- rpm
dependencies:
- git
bindir: /usr
2021-06-08 02:55:18 +00:00
contents:
- src: "./share/man/man1/glab*.1"
dst: "/usr/share/man/man1"
2020-08-05 00:42:32 +00:00
2020-07-29 05:08:02 +00:00
checksum:
2022-07-13 17:06:30 +00:00
name_template: "checksums.txt"
2020-07-29 05:08:02 +00:00
snapshot:
name_template: "{{ .Tag }}"
changelog:
sort: asc
filters:
exclude:
- >
^docs(\(.*\))*:
- >
^test(\(.*\))*:
- "^Merge branch"
2022-07-13 17:06:30 +00:00
- "^chore"
- "^Update README.md"