v2.0.1 #14
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: Publish to PyPI | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
environment: | |
name: pypi | |
url: https://pypi.org/project/aiomqtt | |
permissions: | |
id-token: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Fetch entire history for poetry-dynamic-versioning, see: https://github.com/mtkennerly/poetry-dynamic-versioning/issues/55 | |
- name: Set up Python | |
uses: actions/setup-python@v4 # Uses the Python version in .python-version | |
- name: Install poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Setup dynamic versioning | |
run: poetry self add "poetry-dynamic-versioning[plugin]" | |
- name: Build package | |
run: poetry build | |
- name: Publish to PyPI # Uses trusted publishing and thus doesn't need a token | |
uses: pypa/gh-action-pypi-publish@release/v1 |