Manual PyPI Publish #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |