-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (45 loc) · 1.57 KB
/
build-publish.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
name: Ubuntu and Mac builds
on: [push, pull_request, workflow_dispatch]
jobs:
build_and_publish:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install pacakges
run: python3 -m pip install --upgrade --upgrade-strategy eager twine cibuildwheel
#- name: Build and Test
# run: |
# python3 setup.py build_ext --inplace
# python3 -m unittest discover -v -s tests -p "test_*.py"
- name: Build Wheels
run: |
python3 -m cibuildwheel --output-dir wheelhouse
python3 setup.py sdist
ls -lrt wheelhouse/*
- uses: actions/upload-artifact@v2
with:
name: pygeoda-${{ matrix.os }}
path: wheelhouse/
- name: Publish to Pypi
if: startsWith(github.ref, 'refs/tags/v')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python3 -m pip install --upgrade twine
python3 -m twine upload wheelhouse/*.whl
- name: Publish Source to Pypi
if: matrix.os == 'macos-latest' && startsWith(github.ref, 'refs/tags/v')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python3 -m twine upload dist/*.tar.gz