Skip to content

PyPI

PyPI #5

Workflow file for this run

name: PyPI
on:
push:
tags:
- '*.*.*'
jobs:
pypi:
name: PyPI
runs-on: ubuntu-latest
environment: PyPI
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: pip install build twine
- name: Build package
run: python -m build
- name: Check package
run: python -m twine check --strict dist/*
- name: Upload package (test.pypi)
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN_TEST }}
run: python -m twine upload --non-interactive --repository testpypi dist/*
- name: Upload package (pypi)
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN_PROD }}
run: python -m twine upload --non-interactive dist/*