| 1 |
|
| 2 |
|
| 3 |
s. |
| 4 |
|
| 5 |
ed |
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
name: Upload Python Package |
| 10 |
|
| 11 |
on: |
| 12 |
release: |
| 13 |
types: [published] |
| 14 |
|
| 15 |
|
| 16 |
workflow_dispatch: |
| 17 |
|
| 18 |
permissions: |
| 19 |
contents: read |
| 20 |
|
| 21 |
jobs: |
| 22 |
|
| 23 |
|
| 24 |
ci: |
| 25 |
uses: ./.github/workflows/ci.yml |
| 26 |
permissions: |
| 27 |
contents: read |
| 28 |
publish: |
| 29 |
needs: |
| 30 |
- ci |
| 31 |
runs-on: ubuntu-latest |
| 32 |
timeout-minutes: 10 |
| 33 |
permissions: |
| 34 |
id-token: write |
| 35 |
steps: |
| 36 |
- uses: actions/checkout@v4 |
| 37 |
- name: Set up Python |
| 38 |
uses: actions/setup-python@v5 |
| 39 |
with: |
| 40 |
python-version: "3.13" |
| 41 |
no |
| 42 |
|
| 43 |
- uses: snok/install-poetry@v1 |
| 44 |
- name: Build package |
| 45 |
run: poetry build |
| 46 |
- name: Publish package |
| 47 |
uses: pypa/[email protected] |
| 48 |
with: |
| 49 |
repository-url: ${{ github.event_name == 'release' && 'https://upload.pypi.org/legacy/' || 'https://test.pypi.org/legacy/' }} |