-
Notifications
You must be signed in to change notification settings - Fork 75
36 lines (34 loc) · 1.08 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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