File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -250,13 +250,14 @@ jobs:
250250 env :
251251 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
252252
253- - name : Download all release artifacts
253+ - name : Download all release artifacts
254254 run : |
255255 TAG="${{ needs.check-tag.outputs.tag_name }}"
256256
257- # Get the commit SHA for this tag from GitHub API or current HEAD
258- COMMIT_SHA="${{ github.event.workflow_run.head_sha || github.sha }}"
259- echo "Looking for artifacts from commit: $COMMIT_SHA"
257+ # Get the commit SHA for this tag from GitHub API
258+ COMMIT_SHA=$(gh api repos/${{ github.repository }}/git/ref/tags/${TAG#v} --jq '.object.sha' 2>/dev/null || \
259+ gh api repos/${{ github.repository }}/git/ref/tags/$TAG --jq '.object.sha')
260+ echo "Tag $TAG points to commit: $COMMIT_SHA"
260261
261262 # Find all successful workflow runs for this commit
262263 WORKFLOW_RUNS=$(gh run list --commit $COMMIT_SHA --json databaseId,status,conclusion --jq '.[] | select(.conclusion=="success") | .databaseId')
You can’t perform that action at this time.
0 commit comments