diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index c4d310c..5547e5a 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -70,3 +70,22 @@ jobs: with: name: python-package-distributions path: dist/ + publish-to-pypi: + runs-on: ubuntu-latest + name: >- + Publish Python 🐍 distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + needs: build + environment: + name: pypi + url: https://pypi.org/p/xdlake + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1