Skip to content

Commit 2520c07

Browse files
authored
pypi: trusted publishing & attestations
1 parent 47889da commit 2520c07

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,13 @@ jobs:
247247

248248
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
249249

250+
environment:
251+
name: pypi
252+
url: https://pypi.org/p/lensfunpy
253+
254+
permissions:
255+
id-token: write
256+
250257
steps:
251258
- name: Download wheels from artifact storage
252259
uses: actions/download-artifact@v4
@@ -258,12 +265,8 @@ jobs:
258265
- name: Setup Python
259266
uses: actions/setup-python@v4
260267

261-
- name: Upload wheels to PyPI
262-
run: |
263-
pip install twine
264-
# https://github.com/pypa/twine/issues/1216
265-
pip install -U packaging
266-
twine upload -u __token__ -p ${{ secrets.PYPI_TOKEN }} --skip-existing dist/*
268+
- name: Publish package distributions to PyPI
269+
uses: pypa/gh-action-pypi-publish@release/v1
267270

268271
publish-docs:
269272
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)