Skip to content

Create pypi-publish.yaml #1

Create pypi-publish.yaml

Create pypi-publish.yaml #1

Workflow file for this run

on: push
jobs:
publish-to-pypi:

Check failure on line 3 in .github/workflows/pypi-publish.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/pypi-publish.yaml

Invalid workflow file

The workflow is not valid. .github/workflows/pypi-publish.yaml (Line: 3, Col: 3): The workflow must contain at least one job with no dependencies.
name: "Publish Python 🐍 distribution 📦 to PyPI"
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs: pybuild
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/<package-name> # Replace <package-name> with your PyPI project name
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