From 6066b4a5db09b374325d2d7262be826cc3958448 Mon Sep 17 00:00:00 2001 From: Kori Kuzma Date: Fri, 5 Apr 2024 10:28:15 -0400 Subject: [PATCH] cicd: fix pypi release when multiple branches track same tag (#384) * in `get_branch` job, search for `main` branch to account for cases where multiple branches track the same tag * upgrade to using environment files to replace deprecated `set-output` command --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ff4e81b9..79b12b5f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,8 +16,8 @@ jobs: id: get_branch_name run: | raw=$(git branch -r --contains ${{ github.ref }}) - branch=${raw##*/} - echo "::set-output name=name::$branch" + branch=$(echo "$raw" | grep "origin/main" | sed "s|origin/||" | xargs) + echo "name=$branch" >> "$GITHUB_OUTPUT" build: name: Build distribution runs-on: ubuntu-latest