Skip to content

Commit

Permalink
Update python-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dfjswanson authored Apr 23, 2024
1 parent c28ee59 commit 25723cb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ jobs:
with:
name: python-package-distributions
path: dist/
- name: Set environment based on branch
id: identify
run: |
echo "git log -1 --format='%D' ${{ github.ref }} | grep -Eo '[^\/]+$'" >> $BRANCH
echo $BRANCH
echo "branch_name=${BRANCH}" >> $GITHUB_OUTPUT
outputs:
branch_name: ${{ steps.identify.outputs.branch_name }}


publish-to-pypi:
name: publish python distribution to PyPi based on environment
Expand All @@ -57,7 +66,7 @@ jobs:
runs-on: ubuntu-latest

environment:
name: ${{ github.ref }}
name: ${{ needs.build.outputs.branch_name }}
url: ${{ vars.PYPI_URL }}

permissions:
Expand Down

0 comments on commit 25723cb

Please sign in to comment.