-
Notifications
You must be signed in to change notification settings - Fork 10
52 lines (44 loc) · 1.26 KB
/
cibuildwheel.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
name: CI build wheels
on:
workflow_dispatch:
release:
types:
- released
jobs:
build_wheel_and_sdist:
name: Build pure Python wheel and source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.9'
- name: Build sdist and wheel
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Test
run: |
pip install dist/nmrpy*.whl
python -s -c "import nmrpy; nmrpy.test('noplot')"
- uses: actions/upload-artifact@v2
name: Upload build artifacts
with:
name: wheel_and_tarball
path: dist/*
upload_pypi:
needs: build_wheel_and_sdist
runs-on: ubuntu-latest
# to publish when a GitHub Release is created:
if: github.event_name == 'release' && github.event.action == 'released'
steps:
- uses: actions/[email protected]
with:
name: wheel_and_tarball
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
# repository_url: https://test.pypi.org/legacy/