From ebb4b44071c326e83b65e1d65a17abe40a7e7356 Mon Sep 17 00:00:00 2001 From: mikecarr Date: Fri, 4 Oct 2024 16:54:40 -0700 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 956c2e0..63caf98 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,16 +22,15 @@ jobs: - name: Get version from tag id: vars - run: | - echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - name: Determine Branch id: determine_branch run: | - DEFAULT_BRANCH=$(git symbolic-ref --short HEAD) - 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 BRANCH_NAME="master" - elif [ "$DEFAULT_BRANCH" = "next" ]; then + elif git branch -r --contains $GITHUB_SHA | grep "origin/next"; then BRANCH_NAME="next" else BRANCH_NAME="unknown"