Files
displayarray/.github/workflows/publish.yml
2021-08-10 13:08:53 -07:00

33 lines
971 B
YAML

name: Python package
on: [push]
jobs:
build-and-publish:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install and build
run: |
python -m ensurepip --user
python -m pip install --upgrade pip --user
python -m pip install .[dev]
- name: Build
run: python setup.py sdist bdist_wheel
- 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/
continue-on-error: true
- name: Publish distribution 📦 to PyPI
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}