Skip to content

Update python-publish.yml #3

Update python-publish.yml

Update python-publish.yml #3

name: Build and Upload to PyPI
on:
push:
branches:
- main # Adjust to your main branch name
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x # Specify the Python version you're using
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build Package
run: |
python setup.py sdist bdist_wheel
- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m twine upload --skip-existing dist/*