generated from linkml/linkml-template
-
Notifications
You must be signed in to change notification settings - Fork 8
42 lines (33 loc) · 1 KB
/
pypi-publish.yaml
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
37
38
39
40
41
42
name: Publish Python Package
on:
release:
types: [created]
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
# this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Poetry
run: |
pipx install poetry
pipx inject poetry "poetry-dynamic-versioning[plugin]"
- name: Install project dependencies
run: poetry install --no-interaction
- name: Generate project files
run: |
poetry dynamic-versioning
make squeaky-clean all
- name: Build source and wheel archives
run: poetry build
- name: Publish distribution 📦 to PyPI
# No username or password because we're using trusted publishing
uses: pypa/gh-action-pypi-publish@release/v1