@@ -111,36 +111,14 @@ jobs:
111111 needs : test
112112 if : ${{ success() && (github.event.inputs.allow_deploy == 'true' || github.event.inputs.allow_sphinx_deploy == 'true') }}
113113 runs-on : ubuntu-latest
114+ permissions :
115+ id-token : write
114116 steps :
115- - uses : actions/checkout@v5
116- - name : Set up Python
117- uses : actions/setup-python@v6
118- with :
119- python-version : 3.11
120- - name : Install dependencies
121- run : |
122- python -m pip install --upgrade pip setuptools wheel twine
123- - name : Download artifacts
124- uses : actions/download-artifact@v5
125- with :
126- name : ' dists'
127- path : dist
128- - name : Download sphinx artifacts
129- uses : actions/download-artifact@v5
130- with :
131- name : ' dists-sphinx'
132- path : dist-sphinx
133- - name : Publish to PyPI
134- if : ${{ success() && github.event.inputs.allow_deploy == 'true' }}
135- env :
136- TWINE_REPOSITORY : ${{ secrets.TWINE_REPOSITORY }}
137- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
138- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
139- run : twine upload dist/*
140- - name : Publish Sphinx extension to PyPI
141- if : ${{ success() && github.event.inputs.allow_sphinx_deploy == 'true' }}
142- env :
143- TWINE_REPOSITORY : ${{ secrets.TWINE_REPOSITORY }}
144- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
145- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
146- run : twine upload dist-sphinx/*
117+ - name : Download artifacts
118+ uses : actions/download-artifact@v5
119+ with :
120+ name : ' dists*'
121+ path : dist
122+ merge-multiple : true
123+ - name : Publish distributions
124+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments