Skip to content

Publish Python 🐍 distribution πŸ“¦ to PyPI and TestPyPI #45

Publish Python 🐍 distribution πŸ“¦ to PyPI and TestPyPI

Publish Python 🐍 distribution πŸ“¦ to PyPI and TestPyPI #45

Workflow file for this run

name: Publish python package
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: abatilo/actions-poetry@v3
- run: poetry build
- run: ls dist/
- uses: actions/upload-artifact@v4
with:
path: dist
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs: build
environment:
name: pypi
url: https://pypi.org/p/duckdb_engine/
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
path: dist
- run: ls
- run: ls *
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1