From cabcf5daf1cd1d68ec4dac7cae626c21d8fa425a Mon Sep 17 00:00:00 2001
From: Andrew Block <andy.block@gmail.com>
Date: Fri, 26 Nov 2021 07:33:17 -0600
Subject: [PATCH] Added OCI support to release workflow

Signed-off-by: Andrew Block <andy.block@gmail.com>
---
 .github/workflows/release.yml | 14 ++++++++++++++
 README.md                     | 25 ++++++++++++++++++++++++-
 charts/cosigned/Chart.yaml    |  2 +-
 charts/rekor/Chart.yaml       |  2 +-
 4 files changed, 40 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index d88f5306..6097291c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -30,3 +30,17 @@ jobs:
         uses: helm/chart-releaser-action@v1.2.1
         env:
           CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
+
+      - name: Login to GitHub Container Registry
+        run: |
+          helm registry login --username ${GITHUB_ACTOR} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io
+        env:
+          HELM_EXPERIMENTAL_OCI: 1
+
+      - name: Publish OCI Charts
+        run: |
+          for chart in `find .cr-release-packages -name '*.tgz' -print`; do
+            helm push ${chart} oci://ghcr.io/${GITHUB_REPOSITORY}
+          done
+        env:
+          HELM_EXPERIMENTAL_OCI: 1
diff --git a/README.md b/README.md
index 1c99d626..732531e1 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,14 @@
 [Helm](https://helm.sh) Charts to support the [Sigstore](https://sigstore.dev) project.
 
 
-## Adding the Chart Repository
+## Usage
+
+Charts are available in the following formats:
+
+* [Chart Repository](https://helm.sh/docs/topics/chart_repository/)
+* [OCI Artifacts](https://helm.sh/docs/topics/registries/)
+
+### Installing from the Chart Repository
 
 The following command can be used to add the chart repository:
 
@@ -14,6 +21,22 @@ $ helm repo add sigstore https://sigstore.github.io/helm-charts
 $ helm repo update
 ```
 
+Once the chart has been added, install one of the available charts:
+
+```shell
+$ helm upgrade -i <release_name> sigstore/<chart_name>
+```
+
+### Installing from an OCI Registry
+
+Charts are also available in OCI format. The list of available charts can be found [here](https://github.com/sigstore?tab=packages&repo_name=helm-charts).
+
+Install one of the available charts:
+
+```shell
+$ helm upgrade -i oci://ghcr.io/sigstore/helm-charts/<chart_name> --version=<version>
+```
+
 ## Charts
 
 * [rekor](charts/rekor)
diff --git a/charts/cosigned/Chart.yaml b/charts/cosigned/Chart.yaml
index 5ebbc9e4..70e92a36 100644
--- a/charts/cosigned/Chart.yaml
+++ b/charts/cosigned/Chart.yaml
@@ -8,7 +8,7 @@ sources:
 type: application
 
 name: cosigned
-version: v0.1.5
+version: v0.1.6
 appVersion: v1.3.1
 
 maintainers:
diff --git a/charts/rekor/Chart.yaml b/charts/rekor/Chart.yaml
index eb0cea66..cab92237 100644
--- a/charts/rekor/Chart.yaml
+++ b/charts/rekor/Chart.yaml
@@ -4,7 +4,7 @@ description: Part of the sigstore project, Rekor is a timestamping server and tr
 
 type: application
 
-version: 0.2.6
+version: 0.2.7
 appVersion: 0.3.0
 
 keywords: