diff --git a/.github/workflows/split_monorepo.yml b/.github/workflows/split_monorepo.yml index 9960a19b3..2661f2185 100644 --- a/.github/workflows/split_monorepo.yml +++ b/.github/workflows/split_monorepo.yml @@ -62,6 +62,11 @@ jobs: branch: ${{ github.ref_name }} # with tag + - + if: "startsWith(github.ref, 'refs/tags/')" + id: extract-branch-name + run: echo "branch=$(git branch -a --contains ${{ github.sha }} | grep -v 'HEAD' | sed -n 2p | awk '{ printf $1 }' | sed 's/remotes\/origin\///g')" >> $GITHUB_OUTPUT + - if: "startsWith(github.ref, 'refs/tags/')" # Uses an action in the root directory @@ -78,4 +83,4 @@ jobs: repository_host: "github.com" user_name: "mantle-ci" user_email: "mantle@alley.com" - branch: ${{ github.ref_name }} + branch: ${{ steps.extract-branch-name.outputs.branch }}