Skip to content

Commit 07f1a3f

Browse files
committed
Use OIDC to publish releases
1 parent f2170b7 commit 07f1a3f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/deploy.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ jobs:
9292
upload_pypi:
9393
needs: [ build-dists ]
9494
runs-on: ubuntu-latest
95+
environment: publish
96+
permissions:
97+
id-token: write
9598
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
9699

97100
steps:
@@ -117,7 +120,12 @@ jobs:
117120
- name: Download artifacts
118121
uses: actions/download-artifact@v4
119122
with:
120-
pattern: distributions-*
123+
# There is currently a bug where download-artifact downloading multiple files of the same name corrupts the file.
124+
# https://github.com/actions/download-artifact/issues/298
125+
# Very cool.
126+
# We don't have any native code so using the latest Ubuntu artifact should be OK.
127+
#pattern: distributions-*
128+
pattern: distributions-ubuntu-latest-3.13-pypi
121129
merge-multiple: true
122130
path: dist
123131

@@ -139,6 +147,3 @@ jobs:
139147
140148
- name: Publish packages to PyPI
141149
uses: pypa/[email protected]
142-
with:
143-
user: __token__
144-
password: ${{ secrets.pypi_api_token }}

0 commit comments

Comments
 (0)