From a51194844ef8ba69f7ebf3d06761d3d9fc7c6498 Mon Sep 17 00:00:00 2001 From: Oliver Holworthy Date: Fri, 3 Feb 2023 16:21:30 +0000 Subject: [PATCH] Update branch name extraction for tag builds (#608) * Remove leading whitespace from branch name in workflow for tag build * Filter branches and specify format when using git branch in workflow --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9a8af8943..fce02c30ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,8 +43,7 @@ jobs: branch=main if [[ $ref_type == "tag"* ]] then - raw=$(git branch -r --contains ${{ github.ref_name }}) - branch=${raw/origin\/} + branch=$(git branch -r --contains ${{ github.ref_name }} --list '*release*' --format "%(refname:short)" | sed -e 's/^origin\///') fi tox -e test-cpu -- $branch - name: Generate package for pypi