diff --git a/.github/workflows/release-helm-chart.yaml b/.github/workflows/release-helm-chart.yaml index 5593c24..4bc015b 100644 --- a/.github/workflows/release-helm-chart.yaml +++ b/.github/workflows/release-helm-chart.yaml @@ -6,10 +6,6 @@ name: Release Helm Chart on: - push: - tags: - - 'client-v*' - - 'v*' release: types: [published] @@ -26,8 +22,14 @@ jobs: id-token: write steps: - name: Checkout + # Pin ref to the release tag rather than letting checkout default to + # github.ref, which intermittently arrives empty on release-triggered + # runs (actions/runner#2788, still open). An empty default would cause + # checkout to fall back to the repo default branch and package the + # chart from the wrong commit. uses: actions/checkout@v4 with: + ref: ${{ github.event.release.tag_name }} fetch-depth: 0 - name: Set up Helm @@ -101,10 +103,13 @@ jobs: git push origin gh-pages fi - - name: Upload chart to GitHub Release (on tag) - if: startsWith(github.ref, 'refs/tags/') + - name: Upload chart to GitHub Release + # Pin tag_name from the release event payload rather than relying on + # github.ref / github.ref_name, which intermittently arrive empty on + # release-triggered runs (actions/runner#2788, still open). uses: softprops/action-gh-release@v2 with: + tag_name: ${{ github.event.release.tag_name }} files: client-*.tgz generate_release_notes: true env: