Create pypi.yml

This commit is contained in:
Sam Bull 2021-01-30 18:55:24 +00:00 committed by GitHub
parent b27d9013b9
commit 163069e3e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 34 additions and 0 deletions

34
.github/workflows/pypi.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Publish to PyPI
on:
push:
branches:
- 'master'
tags: [ 'v*' ]
env:
DEFAULT_PYTHON: 3.9
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install dependencies
run: |
pip install --upgrade pip build setuptools wheel
pip install -r requirements-dev.txt
- name: Build
run: |
python -m build
python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}