diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1c933fea..a0c47682 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -152,3 +152,19 @@ jobs: --data-binary @"$asset" \ "${upload_url}?name=$asset_name" done + release-helm-chart: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' + needs: [build-binary] + permissions: write-all + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Release Helm Chart + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + run: | + ./scripts/releaseHelmChart.sh diff --git a/.gitignore b/.gitignore index b2428fda..2b5ef8a6 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ test-db node_modules /release .release_version +chart_releases diff --git a/charts/sidecar/Chart.yaml b/charts/sidecar/Chart.yaml index b2d6e379..6957c1b2 100644 --- a/charts/sidecar/Chart.yaml +++ b/charts/sidecar/Chart.yaml @@ -4,6 +4,6 @@ description: A Helm chart for the EigenLayer sidecar type: application -version: 0.1.0-beta.1 +version: 0.1.0-beta.2 appVersion: "v1.0.0-beta.1" diff --git a/index.yaml b/index.yaml new file mode 100644 index 00000000..75d6bc08 --- /dev/null +++ b/index.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +entries: + sidecar: + - apiVersion: v2 + appVersion: v1.0.0-beta.1 + created: "2024-11-13T21:23:12.29288-06:00" + description: A Helm chart for the EigenLayer sidecar + digest: bb14bb5ec625c6b4596a042aa9b4a1661bb58f1e9710e1cd17250e71ae3e31ec + name: sidecar + type: application + urls: + - https://eigenlayer-sidecar.s3.amazonaws.com/helm/sidecar-0.1.0-beta.1.tgz + version: 0.1.0-beta.1 +generated: "2024-11-13T21:23:12.292376-06:00" diff --git a/scripts/releaseChart.sh b/scripts/releaseChart.sh new file mode 100755 index 00000000..3f298bf2 --- /dev/null +++ b/scripts/releaseChart.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +bucket_name="eigenlayer-sidecar" +helm_repo_url="https://eigenlayer-sidecar.s3.amazonaws.com/helm" + +mkdir chart_releases || true + +helm package ./charts/* --destination chart_releases + +if aws s3 ls "s3://${bucket_name}/helm/index.yaml" &>/dev/null; then + echo "Downloading existing index.yaml" + aws s3 cp "s3://${bucket_name}/helm/index.yaml" ./chart_releases/ + + echo "Generating index" + helm repo index --merge ./chart_releases/index.yaml --url $helm_repo_url ./chart_releases +else + echo "Generating index for the first time" + helm repo index --url $helm_repo_url ./chart_releases +fi + +aws s3 sync ./chart_releases/ "s3://${bucket_name}/helm"