tom-lt 0.4.3 #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release to PyPi | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish_to_pypi: | |
runs-on: ubuntu-latest | |
environment: release # configured in repo Settings/Environments; referenced in PyPI OIDC | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install poetry | |
poetry self add "poetry-dynamic-versioning[plugin]" | |
- name: Build package with poetry | |
run: | | |
poetry build -f wheel | |
poetry build -f sdist | |
- name: Publish to PyPI with pypi-publish (trusted publishing) | |
uses: pypa/[email protected] | |