Skip to content

Commit c6bc348

Browse files
committed
ci: fix pypi publish workflow auth conditions
1 parent 509df9f commit c6bc348

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
publish:
1414
runs-on: ubuntu-latest
1515
environment: release
16+
env:
17+
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
1618
steps:
1719
- uses: actions/checkout@v4
1820

@@ -41,12 +43,12 @@ PY
4143
python -m build
4244
4345
- name: Publish to PyPI (API token)
44-
if: ${{ secrets.PYPI_API_TOKEN != '' }}
46+
if: ${{ env.PYPI_API_TOKEN != '' }}
4547
uses: pypa/gh-action-pypi-publish@release/v1
4648
with:
4749
user: __token__
48-
password: ${{ secrets.PYPI_API_TOKEN }}
50+
password: ${{ env.PYPI_API_TOKEN }}
4951

5052
- name: Publish to PyPI (trusted publisher)
51-
if: ${{ secrets.PYPI_API_TOKEN == '' }}
53+
if: ${{ env.PYPI_API_TOKEN == '' }}
5254
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)