Skip to content

Commit 29d5582

Browse files
committed
Use PYPI_TOKEN secret for PyPI publish
1 parent 18a8784 commit 29d5582

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/pypi-release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616

1717
permissions:
1818
contents: read
19-
id-token: write
2019

2120
steps:
2221
- name: Checkout repository
@@ -35,8 +34,17 @@ jobs:
3534
- name: Build distributions
3635
run: poetry build
3736

37+
- name: Check PyPI token is configured
38+
env:
39+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
40+
run: |
41+
if [ -z "$PYPI_TOKEN" ]; then
42+
echo "PYPI_TOKEN secret is empty or unavailable in the pypi_release environment." >&2
43+
exit 1
44+
fi
45+
3846
- name: Publish to PyPI
3947
uses: pypa/gh-action-pypi-publish@release/v1
4048
with:
4149
user: __token__
42-
password: ${{ secrets.PYPI_RELEASE }}
50+
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)