Skip to content

build-publish.yml: update to use poetry #42

build-publish.yml: update to use poetry

build-publish.yml: update to use poetry #42

Workflow file for this run

---
name: Build and Publish Release via PyPi
on: push
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions πŸ“¦ to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- name: Checkout code πŸ›’
uses: actions/checkout@v4
- name: Update version file ⬆️
uses: brettdorrans/[email protected]
with:
filename: '.VERSION'
placeholder: '${VERSION}'
- name: Set up Python 3.12 🐍
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install and configure Poetry πŸ“œ
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
- name: Build & Package project πŸ‘·
run: poetry build
- name: Publish distribution πŸ“¦ to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}