Skip to content

Commit 455cb9c

Browse files
Use trusted publishing instead of PYPI password/username
1 parent e7ff855 commit 455cb9c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/upload-python-package.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
jobs:
77
deploy:
88
runs-on: ubuntu-latest
9+
environment: stable
10+
permissions:
11+
id-token: write
912
steps:
1013
- name: Checkout
1114
uses: actions/checkout@v2
@@ -25,11 +28,8 @@ jobs:
2528
- name: Install Dependencies
2629
run: poetry install --no-interaction
2730
- name: Build and publish
28-
env:
29-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
30-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
3131
run: |
3232
rm -rf dist/
3333
poetry build
34-
poetry run twine upload dist/*
35-
34+
- name: Publish package distributions to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)