Skip to content

Commit c78c585

Browse files
authored
1 parent 129996d commit c78c585

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/python-publish.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# This workflows will upload a Python Package using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
4-
name: Upload Python Package
1+
name: Publish
52

63
on:
74
release:
@@ -12,9 +9,14 @@ on:
129

1310
jobs:
1411
deploy:
12+
name: Upload to PyPI
1513

1614
runs-on: ubuntu-latest
1715

16+
permissions:
17+
# IMPORTANT: this permission is mandatory for Trusted Publishing
18+
id-token: write
19+
1820
steps:
1921
- uses: actions/checkout@v5
2022
- name: Set up Python
@@ -28,7 +30,11 @@ jobs:
2830
virtualenvs-create: true
2931
virtualenvs-in-project: true
3032

31-
- name: Build and publish
33+
- name: Build
3234
run: |
3335
poetry build -vvv
34-
poetry publish -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }}
36+
ls -lh dist/
37+
38+
# https://github.com/pypa/gh-action-pypi-publish?tab=readme-ov-file#trusted-publishing
39+
- name: Publish package distributions to PyPI
40+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)