Skip to content

Manual PyPI Publish #15

Manual PyPI Publish

Manual PyPI Publish #15

name: Manual PyPI Publish
on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish (optional)'
required: false
type: string
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip install poetry
poetry install
- name: Update version if provided
if: inputs.version != ''
run: poetry version ${{ inputs.version }}
- name: Build package
run: poetry build
- name: Publish to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}