| 1 |
name: Publish |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
tags: |
| 6 |
- "*.*.*" |
| 7 |
|
| 8 |
jobs: |
| 9 |
publish: |
| 10 |
name: Publish the package on pypi |
| 11 |
runs-on: ubuntu-latest |
| 12 |
steps: |
| 13 |
- name: Checkout the source code |
| 14 |
uses: actions/checkout@v6 |
| 15 |
|
| 16 |
- name: Set the python version |
| 17 |
uses: actions/setup-python@v6 |
| 18 |
with: |
| 19 |
python-version: 3.13 |
| 20 |
|
| 21 |
- name: Install dependencies |
| 22 |
uses: ./.github/actions/install |
| 23 |
with: |
| 24 |
python-version: 3.13 |
| 25 |
|
| 26 |
- name: Install builders for publishing |
| 27 |
run: pip install -r requirements/publish.txt |
| 28 |
|
| 29 |
- name: Build the distributions |
| 30 |
run: python -m build --sdist --wheel |
| 31 |
|
| 32 |
- name: Publish the package |
| 33 |
uses: pypa/gh-action-pypi-publish@release/v1 |
| 34 |
with: |
| 35 |
user: __token__ |
| 36 |
password: ${{ secrets.PYPI_API_TOKEN }} |