-
Notifications
You must be signed in to change notification settings - Fork 41
61 lines (51 loc) · 1.61 KB
/
wheels.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
name: Build and Publish Wheels
on: [push, pull_request]
jobs:
build_wheels:
name: Build py3 wheels on ubuntu-22.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.11.3
- name: Build wheels
run: ./samba/dc.sh ./build_and_test_wheels.sh
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_wheels_py27:
name: Build py27 wheel on ubuntu-22.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: sudo apt-get update && sudo apt-get install python2.7
- name: Build wheels
run: ./samba/dc.sh ./build_and_test_wheels27.sh
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_wheels_py27, build_sdist]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}