diff --git a/.github/workflows/chart-release.yaml b/.github/workflows/chart-release.yaml index 7ab4f371fd..6e1ec8305e 100644 --- a/.github/workflows/chart-release.yaml +++ b/.github/workflows/chart-release.yaml @@ -21,89 +21,89 @@ permissions: contents: read jobs: - release: - if: ${{ contains(github.event.*.labels.*.name, 'release') || github.event.inputs.trigger }} - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - steps: - - name: Checkout - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 - with: - fetch-depth: 0 - - name: Install env dependencies - uses: asdf-vm/actions/install@05e0d2ed97b598bfce82fd30daf324ae0c4570e6 # v3 - - name: Remove Dev Comments - run: | - TARGET_FILES=( - "charts/camunda-platform*/values*.yaml" - "charts/camunda-platform*/Chart.yaml" - ) - for FILE in "${TARGET_FILES[@]}"; do - sed -i '/# START DEV COMMENT/,/# END DEV COMMENT/d' $FILE - done - echo "Dev comments removed:" - git --no-pager diff - - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - name: Configure Git - run: | - git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - name: Add Helm repos - run: | - make helm.repos-add - - name: Update Helm dependency - run: | - make helm.dependency-update - - name: cosign-installer - 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)" - echo "CHART_NAME_WITH_VERSION=${CHART_NAME}-${CHART_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 - run: | - sed -ri '/Badge .+/d' charts/camunda-platform/README.md - - name: Run Chart Releaser - uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 - with: - config: .github/config/chart-releaser.yaml - env: - CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - CR_SKIP_EXISTING: 'true' - - name: Sign Helm chart with Cosign - run: | - cosign sign-blob -y .cr-release-packages/${CHART_NAME_WITH_VERSION}.tgz \ - --bundle ${CHART_NAME_WITH_VERSION}.cosign.bundle - - name: Verify signed Helm chart with Cosign - run: | - cosign verify-blob .cr-release-packages/${CHART_NAME_WITH_VERSION}.tgz \ - --bundle ./${CHART_NAME_WITH_VERSION}.cosign.bundle \ - --certificate-identity "https://github.com/${GITHUB_WORKFLOW_REF}" \ - --certificate-oidc-issuer "https://token.actions.githubusercontent.com" - - name: Upload Helm chart signature bundle - run: | - gh release upload "${CHART_NAME_WITH_VERSION}" \ - ./${CHART_NAME_WITH_VERSION}.cosign.bundle \ - --repo "${GITHUB_REPOSITORY}" - env: - GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + # release: + # if: ${{ contains(github.event.*.labels.*.name, 'release') || github.event.inputs.trigger }} + # runs-on: ubuntu-latest + # permissions: + # contents: write + # id-token: write + # steps: + # - name: Checkout + # uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 + # with: + # fetch-depth: 0 + # - name: Install env dependencies + # uses: asdf-vm/actions/install@05e0d2ed97b598bfce82fd30daf324ae0c4570e6 # v3 + # - name: Remove Dev Comments + # run: | + # TARGET_FILES=( + # "charts/camunda-platform*/values*.yaml" + # "charts/camunda-platform*/Chart.yaml" + # ) + # for FILE in "${TARGET_FILES[@]}"; do + # sed -i '/# START DEV COMMENT/,/# END DEV COMMENT/d' $FILE + # done + # echo "Dev comments removed:" + # git --no-pager diff + # - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 + # with: + # path: | + # ~/.cache/go-build + # ~/go/pkg/mod + # key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + # restore-keys: | + # ${{ runner.os }}-go- + # - name: Configure Git + # run: | + # git config user.name "$GITHUB_ACTOR" + # git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + # - name: Add Helm repos + # run: | + # make helm.repos-add + # - name: Update Helm dependency + # run: | + # make helm.dependency-update + # - name: cosign-installer + # 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)" + # echo "CHART_NAME_WITH_VERSION=${CHART_NAME}-${CHART_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 + # run: | + # sed -ri '/Badge .+/d' charts/camunda-platform/README.md + # - name: Run Chart Releaser + # uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 + # with: + # config: .github/config/chart-releaser.yaml + # env: + # CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + # CR_SKIP_EXISTING: 'true' + # - name: Sign Helm chart with Cosign + # run: | + # cosign sign-blob -y .cr-release-packages/${CHART_NAME_WITH_VERSION}.tgz \ + # --bundle ${CHART_NAME_WITH_VERSION}.cosign.bundle + # - name: Verify signed Helm chart with Cosign + # run: | + # cosign verify-blob .cr-release-packages/${CHART_NAME_WITH_VERSION}.tgz \ + # --bundle ./${CHART_NAME_WITH_VERSION}.cosign.bundle \ + # --certificate-identity "https://github.com/${GITHUB_WORKFLOW_REF}" \ + # --certificate-oidc-issuer "https://token.actions.githubusercontent.com" + # - name: Upload Helm chart signature bundle + # run: | + # gh release upload "${CHART_NAME_WITH_VERSION}" \ + # ./${CHART_NAME_WITH_VERSION}.cosign.bundle \ + # --repo "${GITHUB_REPOSITORY}" + # env: + # GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}' post-release: - needs: release + #needs: release runs-on: ubuntu-latest permissions: contents: write diff --git a/scripts/generate-version-matrix.sh b/scripts/generate-version-matrix.sh index 1e08a4056b..b2e0c04ba9 100755 --- a/scripts/generate-version-matrix.sh +++ b/scripts/generate-version-matrix.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -euo pipefail +set -euox pipefail # Check dependencies. dep_names="awk git gomplate helm jq tr yq"