Skip to content

Commit

Permalink
cicd: fix pypi release when multiple branches track same tag (#384)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
korikuzma authored Apr 5, 2024
1 parent e057610 commit 6066b4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6066b4a

Please sign in to comment.