-
Notifications
You must be signed in to change notification settings - Fork 4
87 lines (75 loc) · 2.14 KB
/
Copy pathci.yaml
File metadata and controls
87 lines (75 loc) · 2.14 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Build
on: [push, pull_request]
jobs:
cibuildwheel:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
name: Build wheel (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install build dependencies
run: |
pip install --upgrade pip setuptools wheel cibuildwheel
- name: Build wheel
run: |
cibuildwheel --output-dir dist
env:
CIBW_BUILD: cp3?-* pp3?-*
- uses: actions/upload-artifact@v2
with:
name: dist
path: dist
sdist:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install build dependencies
run: |
pip install --upgrade pip setuptools
- name: Build wheel
run: |
python setup.py sdist
- uses: actions/upload-artifact@v2
with:
name: dist
path: dist
release:
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }}
needs: [cibuildwheel, sdist]
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: dist
path: dist
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install publish dependencies
run: |
pip install twine
- name: Check package
run: |
twine check --strict dist/*
- name: Upload to PyPI
run: |
twine upload --verbose --skip-existing dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}