From 081739b9a3487d945feda292cc9b20cb58c6d1be Mon Sep 17 00:00:00 2001 From: Harivansh Rathi Date: Sat, 7 Feb 2026 20:13:09 -0500 Subject: [PATCH] help release fix --- .github/workflows/ci.yml | 12 ++------ .github/workflows/release-helm.yml | 45 ------------------------------ .github/workflows/release.yml | 18 ++++++++++++ 3 files changed, 21 insertions(+), 54 deletions(-) delete mode 100644 .github/workflows/release-helm.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 734a833..904259d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,21 +20,15 @@ jobs: with: go-version-file: go.mod + - name: Setup Helm + uses: azure/setup-helm@v4 + - name: Build run: go build ./... - name: Test run: go test ./... - helm-lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Helm - uses: azure/setup-helm@v4 - - name: Helm lint run: helm lint chart/agentikube/ diff --git a/.github/workflows/release-helm.yml b/.github/workflows/release-helm.yml deleted file mode 100644 index 9ed8aac..0000000 --- a/.github/workflows/release-helm.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Release Helm Chart - -on: - push: - tags: - - "v*" - -permissions: - packages: write - contents: read - -env: - REGISTRY: ghcr.io - CHART_PATH: chart/agentikube - -jobs: - release: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Helm - uses: azure/setup-helm@v4 - - - name: Log in to GHCR - run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin - - - name: Extract version from tag - id: version - run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" - - - name: Set chart version - run: | - sed -i "s/^version:.*/version: ${{ steps.version.outputs.version }}/" ${{ env.CHART_PATH }}/Chart.yaml - sed -i "s/^appVersion:.*/appVersion: \"${{ steps.version.outputs.version }}\"/" ${{ env.CHART_PATH }}/Chart.yaml - - - name: Lint - run: helm lint ${{ env.CHART_PATH }}/ - - - name: Package - run: helm package ${{ env.CHART_PATH }}/ --destination .helm-pkg - - - name: Push to GHCR - run: helm push .helm-pkg/agentikube-${{ steps.version.outputs.version }}.tgz oci://${{ env.REGISTRY }}/${{ github.repository_owner }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bbf975f..b754e7b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,7 @@ on: permissions: contents: write + packages: write concurrency: group: release-${{ github.ref }} @@ -29,6 +30,9 @@ jobs: with: go-version-file: go.mod + - name: Setup Helm + uses: azure/setup-helm@v4 + - name: Compute next version id: version shell: bash @@ -93,3 +97,17 @@ jobs: name: ${{ steps.version.outputs.next_tag }} generate_release_notes: true files: dist/* + + - name: Set chart version + run: | + sed -i "s/^version:.*/version: ${{ steps.version.outputs.version }}/" chart/agentikube/Chart.yaml + sed -i "s/^appVersion:.*/appVersion: \"${{ steps.version.outputs.version }}\"/" chart/agentikube/Chart.yaml + + - name: Package Helm chart + run: helm package chart/agentikube/ --destination .helm-pkg + + - name: Log in to GHCR + run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin + + - name: Push Helm chart to GHCR + run: helm push .helm-pkg/agentikube-${{ steps.version.outputs.version }}.tgz oci://ghcr.io/${{ github.repository_owner }}