-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (51 loc) · 2.09 KB
/
python-publish.yml
File metadata and controls
54 lines (51 loc) · 2.09 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
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Python package build and publish
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine flake8
- name: Lint with flake8 for syntax errors
run: |
pip install flake8
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Build manylinux Python wheels
#uses: RalfG/python-wheels-manylinux-build@v0.3.4-manylinux2010_x86_64
uses: RalfG/python-wheels-manylinux-build@v0.3.4-manylinux2014_x86_64
with:
# Note that starting with CPython 3.8, default sys.abiflags became an empty string:
# the m flag for pymalloc became useless (builds with and without pymalloc are ABI
# compatible) and so has been removed. (e.g. /opt/python/cp38-cp38)
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39'
build-requirements: 'cython'
package-path: './'
system-packages: 'zip unzip wget git glibc'
pip-wheel-args: '-w ./dist --no-deps -vvv'
- name: Publish wheels to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*-manylinux*.whl --verbose
- name: Test published wheels on PyPI
run: |
sleep 5m
python -m pip install pyfeather
python ./test/python/run_test.py