Skip to content

v2.1.0

v2.1.0 #4

Workflow file for this run

name: Publish
on:
release:
types: [ prereleased, released ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install pypa/build
run: python -m pip install build --user
- name: Install dependencies
run: python -m pip install --upgrade pip -r requirements.txt
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel
- name: Publish distribution 📦 to Test PyPI
if: github.event.action == 'prereleased'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: github.event.action == 'released'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}