Skip to content

Commit 29eb3d6

Browse files
authored
Use Twine to publish wheels (#510)
* CI: Use twine to publish wheels instead of gh-action-pypi-publish * CI: Use the main pypi repository instead of testpypi * CI: Set macos target
1 parent e8731d2 commit 29eb3d6

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/publish_wheels.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
target:
13-
- [ubuntu-latest, manylinux_x86_64]
14-
- [windows-latest, win_amd64]
15-
- [macos-13, macosx_x86_64]
16-
- [macos-14, macosx_arm64]
13+
- [ubuntu-latest, manylinux_x86_64, ""]
14+
- [windows-latest, win_amd64, ""]
15+
- [macos-13, macosx_x86_64, "13.0"]
16+
- [macos-14, macosx_arm64, "14.0"]
1717
python:
1818
- cp39
1919
- cp310
@@ -34,6 +34,7 @@ jobs:
3434
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
3535
env:
3636
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
37+
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.target[2] }}
3738
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.target[1] }}
3839
CIBW_BUILD_VERBOSITY: 1
3940
with:
@@ -46,9 +47,16 @@ jobs:
4647
name: TenSEAL-${{ matrix.python }}-${{ matrix.target[0] }}
4748
path: ./wheelhouse/*.whl
4849

49-
- name: Publish wheels to PyPI
50-
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
50+
- name: Set up Python
51+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
5152
with:
52-
packages-dir: ./wheelhouse/
53-
user: ${{ secrets.PYPI_USERNAME }}
54-
password: ${{ secrets.PYPI_PASSWORD }}
53+
python-version: "3.13"
54+
55+
- name: Install twine
56+
run: python -m pip install --upgrade twine
57+
58+
- name: Publish wheels to PyPI
59+
env:
60+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
61+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
62+
run: twine upload --repository pypi --skip-existing --verbose wheelhouse/*.whl

0 commit comments

Comments
 (0)