3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-01 23:07:59 +00:00

Migrate PyPI publishing to Trusted Publishing (OIDC) (#8420)

* Initial plan

* Migrate publish-pypi job to PyPI Trusted Publishing (OIDC)

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
Copilot 2026-01-28 10:43:45 -08:00 committed by GitHub
parent 203afaab07
commit b2f44b9b9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -650,26 +650,18 @@ jobs:
if: ${{ github.event.inputs.publish_pypi == 'true' }}
needs: [python-package]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Download Python packages
uses: actions/download-artifact@v7.0.0
with:
name: PythonPackage
path: dist
- name: Install twine
run: python3 -m pip install --user -U setuptools importlib_metadata wheel twine
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: python3 -m twine upload dist/*
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist