Skip to content

Publish Package

Publish Package #3

Workflow file for this run

name: Publish Package
on:
workflow_dispatch:
jobs:
pypi:
name: Deploy to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel twine
- name: Build package
run: python setup.py sdist bdist_wheel
# - name: Upload package to Test PyPI
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PIQTURE_TOKEN }}
# run: |
# python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
- name: Upload package to PyPI
if: github.ref == 'refs/heads/main'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m twine upload dist/*