1111
1212env :
1313 LIBRARY_NAME : ' ansys-pythonnet'
14+ MAIN_PYTHON_VERSION : ' 3.11'
1415
1516concurrency :
1617 group : ${{ github.workflow }}-${{ github.ref }}
@@ -142,7 +143,7 @@ jobs:
142143 runs-on : ubuntu-latest
143144 needs : [doc-build, tests]
144145 steps :
145- - uses : pyansys /actions/build-library@v2
146+ - uses : ansys /actions/build-library@v4
146147 with :
147148 library-name : ${{ env.LIBRARY_NAME }}
148149
@@ -153,16 +154,29 @@ jobs:
153154 if : github.event_name == 'push' && contains(github.ref, 'refs/tags')
154155 steps :
155156
156- - name : " Release to the private PyPI repository"
157- uses : pyansys/actions/release-pypi-private@v2
157+ - name : " Checkout project"
158+ uses : actions/checkout@v4
159+
160+ - name : " Install Python ${{ env.MAIN_PYTHON_VERSION }}"
161+ uses : actions/setup-python@v4
158162 with :
159- library-name : ${{ env.LIBRARY_NAME }}
160- twine-username : " __token__"
161- twine-token : ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
163+ python-version : ${{ env.MAIN_PYTHON_VERSION }}
162164
163- - name : " Release to the public PyPI repository"
164- uses : pyansys/actions/release-pypi-public@v2
165+ - name : " Install Python requirements"
166+ run : |
167+ python -m pip install twine
168+
169+ - name : " Download the library artifacts from build-library step"
170+ uses : actions/download-artifact@v3
165171 with :
166- library-name : ${{ env.LIBRARY_NAME }}
167- twine-username : " __token__"
168- twine-token : ${{ secrets.PYPI_TOKEN }}
172+ name : ${{ env.LIBRARY_NAME }}-artifacts
173+ path : ${{ env.LIBRARY_NAME }}-artifacts
174+
175+ - name : " Release to the public PyPI repository"
176+ run : |
177+ python -m twine upload --verbose --skip-existing ${{ env.LIBRARY_NAME }}-artifacts/*.whl
178+ python -m twine upload --verbose --skip-existing ${{ env.LIBRARY_NAME }}-artifacts/*.tar.gz
179+ env :
180+ TWINE_USERNAME : ' __token__'
181+ TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
182+ TWINE_REPOSITORY_URL : ' https://upload.pypi.org/legacy/'
0 commit comments