Skip to content

Commit 961d073

Browse files
authored
ci: switch to trusted publishing for tket pypi (#999)
See: https://www.maturin.rs/distribution.html#using-pypis-trusted-publishing
1 parent f5c2c81 commit 961d073

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/python-wheels.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,15 @@ jobs:
192192
name: Release
193193
runs-on: ubuntu-latest
194194
needs: [linux, musllinux, windows, macos, sdist]
195+
environment: release
196+
permissions:
197+
# IMPORTANT: this permission is mandatory for trusted publishing
198+
id-token: write
195199
if: ${{ (github.event_name == 'release' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket-py-v') ) || (github.event_name == 'workflow_dispatch' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/tket-py-v') ) }}
196200
steps:
197201
- uses: actions/download-artifact@v4
198202
- name: Publish to PyPI
199203
uses: PyO3/maturin-action@v1
200-
env:
201-
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_PUBLISH_TKET2 }}
202204
with:
203205
command: upload
204206
args: --non-interactive --skip-existing wheels-*/*

0 commit comments

Comments
 (0)