36 lines
1015 B
YAML
36 lines
1015 B
YAML
name: Python package
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build-and-publish:
|
|
|
|
runs-on: windows-latest
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 4
|
|
matrix:
|
|
python-version: [3.6, 3.7]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- uses: dschep/install-poetry-action@v1.2
|
|
- name: Install dependencies
|
|
- run: poetry install
|
|
- name: Test with tox
|
|
- run: tox -p auto -o
|
|
- name: Publish distribution 📦 to Test PyPI
|
|
uses: pypa/gh-action-pypi-publish@master
|
|
with:
|
|
password: ${{ secrets.test_pypi_password }}
|
|
repository_url: https://test.pypi.org/legacy/
|
|
- name: Publish distribution 📦 to PyPI
|
|
if: startsWith(github.event.ref, 'refs/tags')
|
|
uses: pypa/gh-action-pypi-publish@master
|
|
with:
|
|
password: ${{ secrets.pypi_password }}
|