diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 7db7f741..16e3a9a8 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -5,25 +5,46 @@ on: types: [published] jobs: - pypi-publish: - name: upload release to PyPI + build: + name: build runs-on: ubuntu-latest - environment: pypi - permissions: - id-token: write steps: - - uses: actions/checkout@v4 + - name: Clone repo + uses: actions/checkout@v4.2.2 - - name: Set up Python - uses: actions/setup-python@v5 + - name: Set up python + uses: actions/setup-python@v5.5.0 with: - python-version: '3.9' + python-version: '3.13' + + - name: Install pip dependencies + run: pip install build - - name: Install build tool - run: python -m pip install --upgrade build + - name: List pip dependencies + run: pip list + + - name: Build project + run: python3 -m build + + - name: Upload artifacts + uses: actions/upload-artifact@v4.6.2 + with: + name: pypi-dist + path: dist/ - - name: Build package - run: python -m build + pypi: + name: pypi + needs: + - build + permissions: + id-token: write + runs-on: ubuntu-latest + steps: + - name: Download artifacts + uses: actions/download-artifact@v4.2.1 + with: + name: pypi-dist + path: dist/ - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@v1.12.4