We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c28ee59 commit 25723cbCopy full SHA for 25723cb
.github/workflows/python-publish.yml
@@ -49,6 +49,15 @@ jobs:
49
with:
50
name: python-package-distributions
51
path: dist/
52
+ - name: Set environment based on branch
53
+ id: identify
54
+ run: |
55
+ echo "git log -1 --format='%D' ${{ github.ref }} | grep -Eo '[^\/]+$'" >> $BRANCH
56
+ echo $BRANCH
57
+ echo "branch_name=${BRANCH}" >> $GITHUB_OUTPUT
58
+ outputs:
59
+ branch_name: ${{ steps.identify.outputs.branch_name }}
60
+
61
62
publish-to-pypi:
63
name: publish python distribution to PyPi based on environment
@@ -57,7 +66,7 @@ jobs:
66
runs-on: ubuntu-latest
67
68
environment:
- name: ${{ github.ref }}
69
+ name: ${{ needs.build.outputs.branch_name }}
70
url: ${{ vars.PYPI_URL }}
71
72
permissions:
0 commit comments