squeaknode/.github/workflows/pypi.yml
Jonathan Zernik e641024eba
Format github action (#1968)
* Format github action

* Split github action into separate workflows
2022-02-27 00:40:14 -08:00

32 lines
752 B
YAML

name: PyPi
on:
push:
branches:
- '**'
tags:
- 'v*.*.*'
pull_request:
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies and build
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python setup.py sdist bdist_wheel
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}