Skip to content

Update main.yml

Update main.yml #5

Workflow file for this run

name: Python package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Test with pytest
run: |
pip install build
pip install pytest
pytest .
- name: Build a source tarball
if: startsWith(github.ref, 'refs/tags')
run: |
pipenv run python setup.py sdist
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}