v1.0.2 #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to PyPI | |
on: | |
push: | |
tags: | |
- 'v*.*.*' # Workflow start when you push tag in folovings format: v1.0.0 | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' # Python version | |
- name: Upgrade pip | |
run: pip install --upgrade pip | |
- name: Install build dependencies | |
run: pip install build | |
- name: Build the package | |
run: python -m build --sdist --wheel | |
- name: Publish to PyPI via Twine | |
env: | |
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
pip install twine | |
twine upload dist/* -u __token__ -p $PYPI_API_TOKEN |