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

Commit

Permalink
update goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
paride5745 committed Feb 23, 2023
1 parent 94d6a35 commit e1f63b9
Showing 1 changed file with 87 additions and 27 deletions.
114 changes: 87 additions & 27 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,99 @@
project_name: k8stcpmap-controller

builds:
- skip: true
- id: manager
binary: manager
goos:
- linux
env:
- CGO_ENABLED=0

release:
prerelease: "true"
extra_files:
- glob: config/release/*.yaml
archives:
- id: manager
name_template: "manager_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
builds:
- manager

checksum:
extra_files:
- glob: config/release/*.yaml
name_template: 'checksums.txt'

source:
enabled: true
name_template: "{{ .ProjectName }}_{{ .Version }}_source_code"

changelog:
use: github-native

sboms:
- id: source
artifacts: source
documents:
- "{{ .ProjectName }}_{{ .Version }}_sbom.spdx.json"

# signs the checksum file
# all files (including the sboms) are included in the checksum
# https://goreleaser.com/customization/sign
#signs:
# - cmd: cosign
# env:
# - COSIGN_EXPERIMENTAL=1
# certificate: "${artifact}.pem"
# args:
# - sign-blob
# - "--output-certificate=${certificate}"
# - "--output-signature=${signature}"
# - "${artifact}"
# artifacts: checksum
# output: true
- id: source
artifacts: source
documents:
- "{{ .ProjectName }}_{{ .Version }}_sbom.spdx.json"

dockers:
- image_templates:
- ghcr.io/doodlescheduling/{{ .ProjectName }}:{{ .Version }}-amd64
dockerfile: Dockerfile.release
use: buildx
ids:
- manager
build_flag_templates:
- --platform=linux/amd64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://github.com/doodlescheduling/{{ .ProjectName }}
- --label=org.opencontainers.image.source=https://github.com/doodlescheduling/{{ .ProjectName }}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=Apache-2.0
- image_templates:
- "ghcr.io/doodlescheduling/{{ .ProjectName }}:{{ .Version }}-arm64v8"
goarch: arm64
dockerfile: Dockerfile.release
use: buildx
ids:
- manager
build_flag_templates:
- --platform=linux/arm64/v8
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://github.com/doodlescheduling/{{ .ProjectName }}
- --label=org.opencontainers.image.source=https://github.com/doodlescheduling/{{ .ProjectName }}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=Apache-2.0

docker_manifests:
- name_template: ghcr.io/doodlescheduling/{{ .ProjectName }}:{{ .Version }}
image_templates:
- ghcr.io/doodlescheduling/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/doodlescheduling/{{ .ProjectName }}:{{ .Version }}-arm64v8
- name_template: ghcr.io/doodlescheduling/{{ .ProjectName }}:latest
image_templates:
- ghcr.io/doodlescheduling/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/doodlescheduling/{{ .ProjectName }}:{{ .Version }}-arm64v8

signs:
- cmd: cosign
certificate: "${artifact}.pem"
env:
- COSIGN_EXPERIMENTAL=1
args:
- sign-blob
- "--output-certificate=${certificate}"
- "--output-signature=${signature}"
- "${artifact}"
artifacts: checksum
output: true

docker_signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
artifacts: images
output: true
args:
- 'sign'
- '${artifact}'

0 comments on commit e1f63b9

Please sign in to comment.