name: Publish Python 🐍 distribution 📦 to PyPI on: push: tags: - "*" jobs: build: name: Build distribution 📦 runs-on: ubuntu-latest steps: - uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v6.0.2 - name: Set up Python 🐍 uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: '3.14' - name: Build a binary wheel and a source tarball run: | python -m pip install pip==26.0.1 python -m pip install build==1.4.2 python -m build . - name: Store the distribution packages uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 with: name: python-package-distributions path: dist/ pypi-publish: name: >- Publish Python 🐍 distribution 📦 to PyPI needs: - build runs-on: ubuntu-latest environment: name: pypi url: https://pypi.org/project/pytest-httpx/${{ github.ref_name }} permissions: id-token: write steps: - name: Download all the dists uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: python-package-distributions path: dist/ - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0