Skip to content

Publish python packages #13

Publish python packages

Publish python packages #13

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Publish python packages
on:
workflow_dispatch:
release:
types:
- created
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Bootstrap poetry
run: |
curl -sL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python - -y
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Build
run: poetry build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/