Skip to content

v2.4.0-pre

v2.4.0-pre #11

Workflow file for this run

name: Publish to PyPI
on:
release:
types:
- published
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
if: "startsWith(github.event.release.tag_name, 'v')"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version-file: .github/workflows/.python-version
- name: Install build dependencies
run: pip install build
- name: Build package
run: python -m build
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1.5
if: "github.event.release.prerelease"
with:
user: __token__
password: ${{ secrets.PYPI_TEST_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
print_hash: true
skip_existing: true
verbose: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1.5
if: "!github.event.release.prerelease"
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
print_hash: true