Skip to content

Commit 8e2220e

Browse files
authored
ci: Use trusted publishing (#642)
1 parent 40a492a commit 8e2220e

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,13 @@ jobs:
221221
release:
222222
runs-on: ubuntu-latest
223223
name: Release
224-
# environment:
225-
# name: release
226-
# url: https://pypi.org/p/obstore
227-
# permissions:
228-
# # IMPORTANT: this permission is mandatory for trusted publishing
229-
# id-token: write
230-
if: startsWith(github.ref, 'refs/tags/')
224+
environment:
225+
name: pypi-release
226+
url: https://pypi.org/p/obstore
227+
permissions:
228+
# IMPORTANT: this permission is mandatory for trusted publishing
229+
id-token: write
230+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
231231
needs: [linux, musllinux, windows, macos, sdist]
232232
steps:
233233
- uses: actions/download-artifact@v4
@@ -239,7 +239,5 @@ jobs:
239239
with:
240240
python-version: 3.13
241241

242-
- uses: pypa/gh-action-pypi-publish@release/v1
243-
with:
244-
user: __token__
245-
password: ${{ secrets.PYPI_API_TOKEN }}
242+
- name: Publish package distributions to PyPI
243+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)