Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Commit

Permalink
refactor: goreleaser.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <troian.ap@gmail.com>
  • Loading branch information
troian committed Jan 11, 2022
1 parent 125bb67 commit 194ec03
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
34 changes: 16 additions & 18 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
env:
- GO111MODULE=on
- DOCKER_CLI_EXPERIMENTAL="enabled"
builds:
- binary: inventory
main: ./
Expand All @@ -12,23 +13,19 @@ builds:
- -trimpath
- -mod=readonly
archives:
- id: inventory
builds:
- inventory-linux-amd64
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
wrap_in_directory: true
format: zip
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
dockers:
- dockerfile: Dockerfile
use: buildx
goos: linux
goarch: amd64
goos: linux
build_flag_templates:
- --pull
- --platform=linux/amd64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://github.com/ovrclk/{{ .ProjectName }}
- --label=org.opencontainers.image.source=https://github.com/ovrclk/{{ .ProjectName }}
- --label=org.opencontainers.image.url={{.GitURL}}
- --label=org.opencontainers.image.source={{.GitURL}}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
Expand All @@ -38,31 +35,32 @@ dockers:
- 'ghcr.io/ovrclk/{{ .ProjectName }}:latest-amd64'
- dockerfile: Dockerfile
use: buildx
goos: linux
goarch: arm64
goos: linux
build_flag_templates:
- --pull
- --platform=linux/arm64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://github.com/ovrclk/{{ .ProjectName }}
- --label=org.opencontainers.image.source=https://github.com/ovrclk/{{ .ProjectName }}
- --label=org.opencontainers.image.url={{.GitURL}}
- --label=org.opencontainers.image.source={{.GitURL}}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
image_templates:
- 'ghcr.io/ovrclk/{{ .ProjectName }}:{{ .ShortCommit }}-arm64v8'
- 'ghcr.io/ovrclk/{{ .ProjectName }}:{{ .Version }}-arm64v8'
- 'ghcr.io/ovrclk/{{ .ProjectName }}:latest-arm64v8'
- 'ghcr.io/ovrclk/{{ .ProjectName }}:{{ .ShortCommit }}-arm64'
- 'ghcr.io/ovrclk/{{ .ProjectName }}:{{ .Version }}-arm64'
- 'ghcr.io/ovrclk/{{ .ProjectName }}:latest-arm64'
docker_manifests:
- name_template: ghcr.io/ovrclk/{{ .ProjectName }}:{{ .ShortCommit }}
image_templates:
- ghcr.io/ovrclk/{{ .ProjectName }}:{{ .ShortCommit }}-amd64
- ghcr.io/ovrclk/{{ .ProjectName }}:{{ .ShortCommit }}-arm64v8
- ghcr.io/ovrclk/{{ .ProjectName }}:{{ .ShortCommit }}-arm64
- name_template: ghcr.io/ovrclk/{{ .ProjectName }}:{{ .Version }}
image_templates:
- ghcr.io/ovrclk/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/ovrclk/{{ .ProjectName }}:{{ .Version }}-arm64v8
- ghcr.io/ovrclk/{{ .ProjectName }}:{{ .Version }}-arm64
- name_template: ghcr.io/ovrclk/{{ .ProjectName }}:latest
image_templates:
- ghcr.io/ovrclk/{{ .ProjectName }}:latest-amd64
- ghcr.io/ovrclk/{{ .ProjectName }}:latest-arm64v8
- ghcr.io/ovrclk/{{ .ProjectName }}:latest-arm64
1 change: 1 addition & 0 deletions .makerc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
GOLANG_VERSION=1.17.6
GORELEASER_VERSION=1.2.5
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include .makerc

GIT_CHGLOG_VERSION ?= v0.15.0

RELEASER_IMAGE := ghcr.io/troian/golang-cross-base:v$(GOLANG_VERSION)
RELEASER_IMAGE := ghcr.io/goreleaser/goreleaser:v$(GORELEASER_VERSION)

GORELEASER_SKIP_VALIDATE ?= false
GORELEASER_SNAPSHOT ?= false
Expand Down

0 comments on commit 194ec03

Please sign in to comment.