diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 128a4cbdab..86bfc3ede3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -175,6 +175,23 @@ jobs: env: GH_TOKEN: ${{ github.token }} + upload-helm-chart-tarball: + needs: release + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install helm + uses: azure/setup-helm@v4.2.0 + id: install + + - name: Generate and upload helm chart tarball + run: | + ./tools/packaging/release/release.sh upload-helm-chart-tarball + env: + GH_TOKEN: ${{ github.token }} + publish-release: needs: [ build-and-push-assets-amd64, build-and-push-assets-arm64, build-and-push-assets-s390x, build-and-push-assets-ppc64le, publish-multi-arch-images, upload-multi-arch-static-tarball, upload-versions-yaml, upload-cargo-vendored-tarball, upload-libseccomp-tarball ] runs-on: ubuntu-22.04 diff --git a/tools/packaging/release/release.sh b/tools/packaging/release/release.sh index 4cd655f2ee..9dcf570718 100755 --- a/tools/packaging/release/release.sh +++ b/tools/packaging/release/release.sh @@ -205,6 +205,16 @@ function _upload_libseccomp_tarball() gh release upload "${RELEASE_VERSION}" "${asc}" } +function _upload_helm_chart_tarball() +{ + _check_required_env_var "GH_TOKEN" + + RELEASE_VERSION="$(_release_version)" + + helm package ${repo_root_dir}/tools/packaging/kata-deploy/helm-chart/kata-deploy + gh release upload "${RELEASE_VERSION}" "kata-deploy-${RELEASE_VERSION}.tgz" +} + function main() { action="${1:-}" @@ -217,6 +227,7 @@ function main() upload-versions-yaml-file) _upload_versions_yaml_file ;; upload-vendored-code-tarball) _upload_vendored_code_tarball ;; upload-libseccomp-tarball) _upload_libseccomp_tarball ;; + upload-helm-chart-tarball) _upload_helm_chart_tarball ;; publish-release) _publish_release ;; *) >&2 _die "Invalid argument" ;; esac