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 2929 if [[ $GITHUB_REF == refs/heads/* ]]; then
3030 REF_TYPE=branch
3131 TARGET_REF=${GITHUB_REF#refs/heads/}
32- elif [[ $GITHUB_REF == refs/tags/* ]]; then
32+ elif [[ $GITHUB_REF == refs/tags/* ]] || [[ -n "${{ github.event.release.tag_name }}" ]] ; then
3333 REF_TYPE=tag
34- TARGET_REF=${GITHUB_REF#refs/tags/}
34+ TARGET_REF=${{ github.event.release.tag_name }}
35+ if [ -z "$TARGET_REF" ]; then
36+ TARGET_REF=${GITHUB_REF#refs/tags/}
37+ fi
3538 elif [[ $GITHUB_REF == refs/pull/* ]]; then
3639 REF_TYPE=pull_request
3740 TARGET_REF=$GITHUB_SHA
4649 SHORT_SHA="${SHA:0:7}"
4750
4851 # Remove invalid tag characters from TARGET_REF
49- TARGET_REF="${TARGET_REF#refs/tags/}"
50- TARGET_REF="${TARGET_REF#refs/heads/}"
5152 TARGET_REF=${TARGET_REF////-} # Replace slashes with hyphens
5253 TARGET_REF=${TARGET_REF//[^a-zA-Z0-9_.-]/_} # Replace invalid characters with underscores
5354 TARGET_REF=${TARGET_REF// /_} # Replace whitespaces with underscores
You can’t perform that action at this time.
0 commit comments