Skip to content

Commit ebb4b44

Browse files
authored
Update release.yml
1 parent ed93f62 commit ebb4b44

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,15 @@ jobs:
2222

2323
- name: Get version from tag
2424
id: vars
25-
run: |
26-
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
25+
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
2726

2827
- name: Determine Branch
2928
id: determine_branch
3029
run: |
31-
DEFAULT_BRANCH=$(git symbolic-ref --short HEAD)
32-
if [ "$DEFAULT_BRANCH" = "master" ]; then
30+
# Attempt to find the branch the tag is from
31+
if git branch -r --contains $GITHUB_SHA | grep "origin/master"; then
3332
BRANCH_NAME="master"
34-
elif [ "$DEFAULT_BRANCH" = "next" ]; then
33+
elif git branch -r --contains $GITHUB_SHA | grep "origin/next"; then
3534
BRANCH_NAME="next"
3635
else
3736
BRANCH_NAME="unknown"

0 commit comments

Comments
 (0)