Skip to content

Add additional error logging #67

Add additional error logging

Add additional error logging #67

name: Publish Release to PyPI
on:
workflow_dispatch:
inputs:
version:
type: string
description: The version for PyPI to publish
required: true
release:
types:
- released
jobs:
build-and-upload-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools wheel twine
- name: Build and publish release
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
if [ -z ${{ github.event.inputs.version }} ]; then VERSION=${{ github.event.release.tag_name }}; else VERSION=${{ github.event.inputs.version }}; fi
python setup.py sdist bdist_wheel $VERSION
twine upload dist/*