Skip to content

Update publish.yml

Update publish.yml #5

Workflow file for this run

name: Publish to PyPI
on:
push:
branches:
- main
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
# Check out the repository
- name: Check out code
uses: actions/checkout@v3
# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
# Build the package
- name: Build the package
run: |
python -m build
# Publish to PyPI
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m twine upload dist/*