Skip to content

Build and publish to PyPi #202

Build and publish to PyPi

Build and publish to PyPi #202

Workflow file for this run

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-20.04
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