Skip to content

Publish to PyPI

Publish to PyPI #5

Workflow file for this run

name: Publish to PyPI
on:
push:
tags:
- '*'
jobs:
build-and-release:
name: Build and make a release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Upgrade pip
run: |
python -m pip install -U pip
- name: Configure environments
run: |
python --version
- name: Install dependencies
run: |
pip install -e ".[test]"
- name: Run tests
run: |
pytest --color=yes -v -s
env:
PYTHONIOENCODING: UTF-8
- name: Build a source distribution
run: >-
python setup.py sdist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}