| 1 |
name: deploy |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
tags: |
| 6 |
- '*' |
| 7 |
|
| 8 |
jobs: |
| 9 |
build: |
| 10 |
runs-on: ubuntu-latest |
| 11 |
|
| 12 |
steps: |
| 13 |
- uses: actions/checkout@v4 |
| 14 |
- uses: actions/setup-python@v5 |
| 15 |
with: |
| 16 |
python-version: 3.14 |
| 17 |
- name: Build |
| 18 |
run: | |
| 19 |
pip install --upgrade pip build |
| 20 |
python -m build -s -w |
| 21 |
- name: Store the distribution packages |
| 22 |
uses: actions/upload-artifact@v4 |
| 23 |
with: |
| 24 |
name: python-package-distributions |
| 25 |
path: dist/ |
| 26 |
|
| 27 |
pypi-publish: |
| 28 |
needs: |
| 29 |
- build |
| 30 |
runs-on: ubuntu-latest |
| 31 |
environment: pypi |
| 32 |
permissions: |
| 33 |
# IMPORTANT: this permission is mandatory for Trusted Publishing |
| 34 |
id-token: write |
| 35 |
|
| 36 |
steps: |
| 37 |
- name: Download all the dists |
| 38 |
uses: actions/download-artifact@v4 |
| 39 |
with: |
| 40 |
name: python-package-distributions |
| 41 |
path: dist/ |
| 42 |
- name: Publish distribution |
| 43 |
uses: pypa/gh-action-pypi-publish@release/v1 |
| 44 |
with: |
| 45 |
print-hash: true |