diff --git a/.github/workflows/chart-release.yaml b/.github/workflows/chart-release.yaml index a798c2d9ff..4316c28d93 100644 --- a/.github/workflows/chart-release.yaml +++ b/.github/workflows/chart-release.yaml @@ -12,6 +12,9 @@ on: pull_request: types: - labeled + push: + branches: + - release concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -22,7 +25,7 @@ permissions: jobs: release: - if: ${{ contains(github.event.*.labels.*.name, 'release') || github.event.inputs.trigger }} + #if: ${{ contains(github.event.*.labels.*.name, 'release') || github.event.inputs.trigger }} runs-on: ubuntu-latest permissions: contents: write @@ -68,16 +71,23 @@ jobs: uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0 - name: Set Helm chart version var run: | - CHART_NAME="$(yq ".name" charts/camunda-platform/Chart.yaml)" - CHART_VERSION="$(yq ".version" charts/camunda-platform/Chart.yaml)" + CHART_NAME="$(yq '.name' charts/camunda-platform/Chart.yaml)" + CHART_VERSION="$(yq '.version' charts/camunda-platform/Chart.yaml)" + APP_VERSION="$(yq '.appVersion' charts/camunda-platform/Chart.yaml | sed 's/.x//g')" echo "CHART_NAME_WITH_VERSION=${CHART_NAME}-${CHART_VERSION}" | tee -a $GITHUB_ENV + echo "CHART_NAME_WITH_APP_VERSION=${CHART_NAME}-${APP_VERSION}" | tee -a $GITHUB_ENV # TODO: Move this step to pre-release workflow when we have it. - name: Generate release note footer run: | make release.generate-notes-footer - - name: Clean up release readme + - name: Tidy up run: | + # Clean up badges from readme to avoid showing them in Artifact Hub. sed -ri '/Badge .+/d' charts/camunda-platform/README.md + # Rename chart dir to keep the release order by Chart Releaser. + mv "charts/camunda-platform" "charts/${CHART_NAME_WITH_APP_VERSION}" + git add "charts/${CHART_NAME_WITH_APP_VERSION}" + git commit -m "temp" - name: Run Chart Releaser uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 with: