Skip to content

Commit

Permalink
Upload Helm chart as OCI artifact to GCHR
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Henschel <[email protected]>
  • Loading branch information
jacksgt committed Oct 20, 2023
1 parent c987f6d commit 5a534b8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@ project_name: cert-manager-openshift-routes
before:
hooks:
- go test -v ./...
# update static manifests
- ./hack/generate-static-manifest.sh {{ .Version }}
# update Helm chart version
- sed -i 's/^version:.*$/version: {{ trimprefix .Version "v" }}/' deploy/chart/Chart.yaml
- sed -i 's/^appVersion:.*$/appVersion: {{ trimprefix .Version "v" }}/' deploy/chart/Chart.yaml
# package Helm
- helm package ./deploy/chart --version {{ trimprefix .Version "v"}} --app-version {{ .Version }}
# upload Helm chart as OCI artifact to GitHub Container Registry
- '{{if .IsSnapshot}}echo SKIPPING: {{end}}helm push ./openshift-routes-{{ trimprefix .Version "v"}}.tgz oci://ghcr.io/cert-manager/cert-manager-openshift-routes:{{ .Version }}-chart'

builds:
- id: cert-manager-openshift-routes
main: ./internal/cmd
Expand Down Expand Up @@ -133,4 +142,5 @@ release:
extra_files:
- glob: ./cert-manager-openshift-routes-*.yaml
name_template: cert-manager-openshift-routes.yaml

- glob: ./cert-manager-openshift-routes-*.tgz
name_template: cert-manager-openshift-routes-chart.tgz

0 comments on commit 5a534b8

Please sign in to comment.