Skip to content

Commit dc2e40b

Browse files
authored
(FEATURE) creating pypi workflow
using a many linux action so that linux pips are uploaded to pypi
1 parent 3f2639a commit dc2e40b

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed
Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
1-
# This workflows will upload a Python Package using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
4-
name: Upload Python Package
1+
name: Python package build and publish
52

63
on:
74
push:
8-
branches:
9-
- master
105

116
jobs:
127
deploy:
13-
148
runs-on: ubuntu-latest
15-
169
steps:
1710
- uses: actions/checkout@v2
1811
- name: Set up Python
19-
uses: actions/setup-python@v2
12+
uses: actions/setup-python@v1
2013
with:
21-
python-version: '3.x'
14+
python-version: 3.8
2215
- name: Install dependencies
2316
run: |
24-
pip install -r requirements.txt
2517
python -m pip install --upgrade pip
26-
pip install setuptools wheel twine
27-
- name: Build and publish
18+
pip install twine flake8
19+
- name: Lint with flake8 for syntax errors
20+
run: |
21+
pip install flake8
22+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
23+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
24+
- name: Build manylinux Python wheels
25+
uses: RalfG/python-wheels-manylinux-build@v0.2.2-manylinux2010_x86_64
26+
with:
27+
python-versions: 'cp36-cp36m cp37-cp37m'
28+
build-requirements: 'cython numpy scipy scikit-learn'
29+
system-packages: ''
30+
package-path: ''
31+
pip-wheel-args: ''
32+
- name: Publish wheels to PyPI
2833
env:
2934
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
3035
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
3136
run: |
32-
python setup.py sdist bdist_wheel
33-
twine upload dist/*
37+
twine upload wheelhouse/*-manylinux*.whl

0 commit comments

Comments
 (0)