@@ -68,25 +68,48 @@ jobs:
6868 name : cibw-wheels-${{ matrix.os }}
6969 path : wheelhouse/*.whl
7070
71- upload_pypi :
72- name : Upload to PyPI (manual trigger)
73- needs : [build_sdist, build_wheels]
71+ # publish-qoco-to-pypi:
72+ # name: >-
73+ # Publish QOCO Wheels to PyPI
74+ # if: startsWith(github.ref, 'refs/tags/')
75+ # needs:
76+ # - build_sdist
77+ # - build_wheels
78+ # runs-on: ubuntu-latest
79+ # environment:
80+ # name: pypi
81+ # url: https://pypi.org/p/qoco
82+ # permissions:
83+ # id-token: write
84+ # steps:
85+ # - name: Download all the dists
86+ # uses: actions/download-artifact@v6
87+ # with:
88+ # name: python-package-distributions
89+ # path: dist/
90+ # - name: Publish distribution 📦 to PyPI
91+ # uses: pypa/gh-action-pypi-publish@release/v1
92+
93+ publish-qoco-to-testpypi :
94+ name : Publish QOCO Wheels to TestPyPI
95+ needs :
96+ - build
7497 runs-on : ubuntu-latest
75- if : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.deploy == 'true' }}
7698
77- steps :
78- - uses : actions/download-artifact@v4
79- with :
80- pattern : " *wheels*"
81- merge-multiple : true
99+ environment :
100+ name : testpypi
101+ url : https://test.pypi.org/p/qoco
82102
83- - name : Install Twine
84- run : |
85- python -m pip install --upgrade twine
103+ permissions :
104+ id-token : write
86105
87- - name : Upload to PyPI
88- env :
89- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
90- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
91- run : |
92- twine upload --skip-existing *.whl *.tar.gz
106+ steps :
107+ - name : Download all the dists
108+ uses : actions/download-artifact@v6
109+ with :
110+ name : python-package-distributions
111+ path : dist/
112+ - name : Publish distribution to TestPyPI
113+ uses : pypa/gh-action-pypi-publish@release/v1
114+ with :
115+ repository-url : https://test.pypi.org/legacy/
0 commit comments