Skip to content

Fix poetry-dynamic-versioning for PEP 517 builds (#609) #2

Fix poetry-dynamic-versioning for PEP 517 builds (#609)

Fix poetry-dynamic-versioning for PEP 517 builds (#609) #2

Workflow file for this run

name: Publish to PyPi
on:
push:
tags:
# This pattern is not a typical regular expression, see:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
- "v*"
permissions:
id-token: write # Used to authenticate to PyPI via OIDC.
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
environment: release
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup poetry
id: poetry_setup
uses: ItsDrike/setup-poetry@v1
with:
python-version: 3.11
install-args: "--with release"
- name: Prepare pyproject.toml with dynamic version
run: poetry run poetry-dynamic-versioning
- name: Build package
run: poetry build
# This uses PyPI's trusted publishing, so no token is required
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1