From c55d7cf38b63c9829b6353412b985d65f9c77478 Mon Sep 17 00:00:00 2001 From: Sebastian Webber Date: Wed, 19 Aug 2020 23:01:53 -0300 Subject: [PATCH] feat: add goreleaser basic config this commits adds the basic config for goreleaser build, compact, package rpm and deb, and docker image. --- .gitignore | 3 +++ .goreleaser.yml | 58 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 .goreleaser.yml diff --git a/.gitignore b/.gitignore index e30fb5e3b5..1ea64989e2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,6 @@ result # ignore JetBrains IDEs (GoLand) config folder .idea + +# goreleaser dist dir +dist/ \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000000..eab9cf8793 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,58 @@ +# This is an example goreleaser.yaml file with some sane defaults. +# Make sure to check the documentation at http://goreleaser.com +# before: +# hooks: +# # You may remove this if you don't use go modules. +# - go mod download +# # you may remove this if you don't need go generate +# - go generate ./... +builds: + - id: "linux" + env: + - CGO_ENABLED=1 + goos: + - linux + dir: cmd/skopeo + binary: skopeo + goarch: + - amd64 + +archives: + - replacements: + linux: Linux + amd64: x86_64 + +nfpms: + - id: linux + formats: + - deb + - rpm + overrides: + deb: + dependencies: + - libgpgme11 + - libdevmapper1.02.1 + - ca-certificates + rpm: + dependencies: + - device-mapper-devel +source: + enabled: true +dockers: + - builds: + - linux + image_templates: + - "containers/{{.ProjectName}}:{{ .Tag }}" + - "containers/{{.ProjectName}}:v{{ .Major }}" + - "containers/{{.ProjectName}}:v{{ .Major }}.{{ .Minor }}" + - "containers/{{.ProjectName}}:latest" +checksum: + name_template: "checksums.txt" +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:"