mirror of
https://github.com/Z3Prover/z3
synced 2026-02-20 15:34:41 +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:
parent
78cb28d0cd
commit
5dd01acb42
1 changed files with 7 additions and 15 deletions
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
|
|
@ -650,26 +650,18 @@ jobs:
|
||||||
if: ${{ github.event.inputs.publish_pypi == 'true' }}
|
if: ${{ github.event.inputs.publish_pypi == 'true' }}
|
||||||
needs: [python-package]
|
needs: [python-package]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
environment: pypi
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: read
|
||||||
steps:
|
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
|
- name: Download Python packages
|
||||||
uses: actions/download-artifact@v7.0.0
|
uses: actions/download-artifact@v7.0.0
|
||||||
with:
|
with:
|
||||||
name: PythonPackage
|
name: PythonPackage
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
- name: Install twine
|
|
||||||
run: python3 -m pip install --user -U setuptools importlib_metadata wheel twine
|
|
||||||
|
|
||||||
- name: Publish to PyPI
|
- name: Publish to PyPI
|
||||||
env:
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
TWINE_USERNAME: __token__
|
with:
|
||||||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
packages-dir: dist
|
||||||
run: python3 -m twine upload dist/*
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue