{"id":15673153,"url":"https://github.com/casperdcl/deploy-pypi","last_synced_at":"2025-05-06T22:13:06.467Z","repository":{"id":47003036,"uuid":"245298816","full_name":"casperdcl/deploy-pypi","owner":"casperdcl","description":"Securely build and upload Python distributions to PyPI","archived":false,"fork":false,"pushed_at":"2025-02-05T11:42:45.000Z","size":52,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"v2","last_synced_at":"2025-05-06T22:12:06.895Z","etag":null,"topics":["actions","deployment","github-actions","python","upload"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/casperdcl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"casperdcl","custom":"https://cdcl.ml/sponsor"}},"created_at":"2020-03-06T00:48:12.000Z","updated_at":"2025-04-09T10:15:31.000Z","dependencies_parsed_at":"2025-04-19T10:33:25.872Z","dependency_job_id":"81c2eef7-340f-495c-bbbb-2349635213da","html_url":"https://github.com/casperdcl/deploy-pypi","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fdeploy-pypi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fdeploy-pypi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fdeploy-pypi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casperdcl%2Fdeploy-pypi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/casperdcl","download_url":"https://codeload.github.com/casperdcl/deploy-pypi/tar.gz/refs/heads/v2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252776600,"owners_count":21802469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","deployment","github-actions","python","upload"],"created_at":"2024-10-03T15:37:40.349Z","updated_at":"2025-05-06T22:13:05.967Z","avatar_url":"https://github.com/casperdcl.png","language":null,"funding_links":["https://github.com/sponsors/casperdcl","https://cdcl.ml/sponsor"],"categories":[],"sub_categories":[],"readme":"# GitHub Action: PyPI Deployment\n\n[![Test](https://github.com/casperdcl/deploy-pypi/actions/workflows/test.yml/badge.svg)](https://github.com/casperdcl/deploy-pypi/actions/workflows/test.yml)\n\nSecurely build and upload Python distributions to PyPI.\n\n## Example\n\n```yaml\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-python@v5\n      - uses: casperdcl/deploy-pypi@v2\n        with:\n          build: --sdist --wheel --outdir dist .\n          # only upload if a tag is pushed (otherwise just build \u0026 check)\n          upload: ${{ github.event_name == 'push' \u0026\u0026 startsWith(github.event.ref, 'refs/tags') }}\n```\n\n## Why\n\nPyPI Deployment:\n\n- Supports `build`ing\n  + supports customisable build requirements\n  + supports customisable build command\n  + supports [PEP517](https://www.python.org/dev/peps/pep-0517) projects lacking a `setup.py` file\n- Supports GPG signing\n- Each stage is optional (`build`, `check`, `sign` and `upload`)\n- Uses a blazing fast native GitHub composite action\n- Outputs names of files for upload (for convenience in subsequent steps)\n- Has the entirety of the code in a [single file](https://github.com/casperdcl/deploy-pypi/blob/master/action.yml), making it very easy to review\n  + If you are [extremely security conscious](https://github.com/casperdcl/deploy-pypi/issues/6#issuecomment-721954322) you can use a commit SHA of a version you've manually reviewed (e.g. `uses: casperdcl/deploy-pypi@`[3181cc0919c032ba42e365bd514e27442c54a3be](https://github.com/casperdcl/deploy-pypi/commit/3181cc0919c032ba42e365bd514e27442c54a3be))\n\nThe main alternative GitHub Action\n[pypi-publish](https://github.com/marketplace/actions/pypi-publish)\ncurrently does not offer the benefits above.\n\nOther features (supported by both) include:\n\n- Supports checking built files\n- Supports skipping existing uploads\n- Supports OIDC PyPI trusted publishing\n\n## Inputs\n\nYou likely should specify exactly one of the following: `setup`, `build` or `pip`.\n\n```yaml\ninputs:\n  user:\n    description: PyPI username\n    default: __token__\n  password:\n    description: PyPI password or API token\n    required: false\n  registry_domain:\n    description: PyPI trusted publisher URL\n    required: false\n    default: https://upload.pypi.org\n  requirements:\n    description: Packages to `pip install` before building\n    default: twine wheel build\n  setup:\n    description: '`setup.py` command to run (\"true\" is a shortcut for \"clean sdist -d \u003cdist_dir\u003e bdist_wheel -d \u003cdist_dir\u003e\")'\n    default: false\n  build:\n    description: '`python -m build` command to run (\"true\" is a shortcut for \"-o \u003cdist_dir\u003e\")'\n    default: false\n  pip:\n    description: '`pip` command to run (\"true\" is a shortcut for \"wheel -w \u003cdist_dir\u003e --no-deps .\")'\n    default: false\n  check:\n    description: Whether to run basic checks on the built files\n    default: true\n  upload:\n    description: Whether to upload\n    default: true\n  dist_dir:\n    description: Directory containing distributions\n    default: dist\n  url:\n    description: Destination repository (package index) URL\n    default: ''\n  gpg_key:\n    description: GPG key to import for signing\n    default: ''\n  skip_existing:\n    description: Continue uploading files if one already exists\n    default: false\noutputs:\n  whl:\n    description: Basename of *.whl for upload\n  targz:\n    description: Basename of *.tar.gz for upload\n  whl_asc:\n    description: Basename of *.whl.asc for upload (requires \u003cgpg_key\u003e)\n  targz_asc:\n    description: Basename of *.tar.gz.asc for upload (requires \u003cgpg_key\u003e)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasperdcl%2Fdeploy-pypi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcasperdcl%2Fdeploy-pypi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasperdcl%2Fdeploy-pypi/lists"}