2021-01-30 18:55:24 +00:00
|
|
|
name: Publish to PyPI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags: [ 'v*' ]
|
|
|
|
|
|
|
|
env:
|
|
|
|
DEFAULT_PYTHON: 3.9
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
name: Publish to PyPI
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2021-01-30 23:23:50 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2021-01-30 18:55:24 +00:00
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{ env.DEFAULT_PYTHON }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2021-01-30 23:07:09 +00:00
|
|
|
pip install --upgrade build
|
2021-01-30 18:55:24 +00:00
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
python -m build
|
|
|
|
- name: Publish to PyPI
|
|
|
|
uses: pypa/gh-action-pypi-publish@master
|
|
|
|
with:
|
|
|
|
password: ${{ secrets.PYPI_API_TOKEN }}
|