Defining PyPi publishing

Change-Id: I6412a016e592f461bdef9e8d34ccacf0b8f078f5
This commit is contained in:
AndreaDAmico
2025-04-18 10:41:05 -04:00
parent c30308eb92
commit 13a81e8f94

View File

@@ -53,6 +53,46 @@ jobs:
- tox_env: docs
dnf_install: graphviz
release-build:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository_owner == 'Telecominfraproject' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: build release distributions
run: |
python -m pip install build
python -m build
- name: upload windows dists
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/
pypi-publish:
runs-on: ubuntu-latest
needs:
- release-build
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository_owner == 'Telecominfraproject' }}
permissions:
id-token: write
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f
other-platforms:
name: Tests on other platforms
runs-on: ${{ matrix.os }}