Build and publish to PyPi #203
This file contains hidden or 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: Build and publish to PyPi | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Tag to publish (v*.*.*)' | |
required: true | |
type: string | |
jobs: | |
build-n-publish: | |
name: Build and publish to PyPi | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.tag }} | |
- uses: actions/setup-python@v5 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade poetry | |
poetry install | |
- name: Build | |
run: | | |
poetry build | |
- name: Configure Poetry credentials | |
run: | | |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | |
- name: Publish | |
run: | | |
poetry publish |