We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed93f62 commit ebb4b44Copy full SHA for ebb4b44
.github/workflows/release.yml
@@ -22,16 +22,15 @@ jobs:
22
23
- name: Get version from tag
24
id: vars
25
- run: |
26
- echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
+ run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
27
28
- name: Determine Branch
29
id: determine_branch
30
run: |
31
- DEFAULT_BRANCH=$(git symbolic-ref --short HEAD)
32
- if [ "$DEFAULT_BRANCH" = "master" ]; then
+ # Attempt to find the branch the tag is from
+ if git branch -r --contains $GITHUB_SHA | grep "origin/master"; then
33
BRANCH_NAME="master"
34
- elif [ "$DEFAULT_BRANCH" = "next" ]; then
+ elif git branch -r --contains $GITHUB_SHA | grep "origin/next"; then
35
BRANCH_NAME="next"
36
else
37
BRANCH_NAME="unknown"
0 commit comments