Add publishing to github action

This commit is contained in:
Sam Bentley
2021-05-26 21:18:23 +01:00
parent 50a03e6bd3
commit 2acace565d

View File

@@ -42,3 +42,40 @@ jobs:
deactivate
rm -r lib/
pytest -v --capture=tee-sys
publish:
needs: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: os: [ubuntu-latest, macos-latest, windows-latest]
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest pandas maturin
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build Python package
run: maturin build --release
- name: List wheels
if: matrix.os == 'windows-latest'
run: dir target\wheels\
- name: List wheels
if: matrix.os != 'windows-latest'
run: find ./target/wheels/
- name: PyPi publish
env:
MATURIN_PASSWORD: ${{ secrets.PYPI }}
run: maturin publish --username Yeltneb