-
Notifications
You must be signed in to change notification settings - Fork 508
64 lines (62 loc) · 1.87 KB
/
pythonpublish_wheel.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Upload Python Wheels
on:
workflow_dispatch:
inputs:
checkout_ref:
description: "The branch, tag or SHA to checkout."
required: true
default: "master"
jobs:
linux-deploy:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
strategy:
matrix:
python: ["cp38-cp38", "cp39-cp39", "cp310-cp310", "cp311-cp311"]
steps:
- uses: actions/checkout@v1
with:
ref: ${{ inputs.checkout_ref }}
- name: Build wheel
env:
PYTHON: /opt/python/${{ matrix.python }}/bin/python
run: |
$PYTHON -m pip install "cython<3" oldest-supported-numpy
$PYTHON -m build --no-isolation
auditwheel repair dist/*linux_x86_64.whl
- name: Publish to pypi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pipx install twine
twine upload dist/*.tar.gz --skip-existing
twine upload wheelhouse/*.whl --skip-existing
other-deploy:
strategy:
matrix:
python: ["3.9", "3.10", "3.11", "3.12"]
os: [windows-2019, macos-11]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
with:
ref: ${{ inputs.checkout_ref }}
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools build wheel twine
pip install cython "numpy>=2"
- name: Build wheel
run: |
python -m build --no-isolation
- name: Publish to pypi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*.whl --skip-existing