Skip to content

Create publish-to-pypi.yml #1

Create publish-to-pypi.yml

Create publish-to-pypi.yml #1

name: Publish Python Package
on: [push, pull_request]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install pipenv
pip install lupa>=2.2
- name: Build package
run: python -m build
- name: Publish package
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install twine
python -m twine upload dist/*