Skip to content

Commit c60738f

Browse files
committed
Linux
1 parent 74b07bc commit c60738f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
1616
SUFFIX="$GITHUB_BASE_REF-pr$PR_NUMBER"
1717
fi
1818
else
19-
BRANCH=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
20-
if [ "$BRANCH" != "master" ]; then
21-
SUFFIX="$BRANCH"
19+
if [ "$GITHUB_REF_TYPE" == "tag" && "$GITHUB_BASE_REF" =~ ^[0-9]+\.[0-9]+\.[0-9]+(.+)$ ]; then
20+
SUFFIX="${BASH_REMATCH[1]}"
21+
elif [ "$GITHUB_BASE_REF" != "master" ]; then
22+
SUFFIX="$GITHUB_BASE_REF"
2223
fi
2324
fi
2425
if [ -n "$SUFFIX" ]; then

0 commit comments

Comments
 (0)