mirror of
https://github.com/pypa/gh-action-pypi-publish.git
synced 2024-11-23 17:11:07 -05:00
8a08d61689
Some checks failed
🧪 / smoke-test (push) Has been cancelled
PR #236 This patch adds PEP 740 attestation generation to the workflow: when the Trusted Publishing flow is used, this will generate a publish attestation for each distribution being uploaded. These generated attestations are then fed into `twine`, which newly supports them via `--attestations`. Ref: https://github.com/pypi/warehouse/issues/15871
105 lines
3.3 KiB
YAML
105 lines
3.3 KiB
YAML
---
|
|
name: pypi-publish
|
|
description: Upload Python distribution packages to PyPI
|
|
inputs:
|
|
user:
|
|
description: PyPI user
|
|
required: false
|
|
default: __token__
|
|
password:
|
|
description: Password for your PyPI user or an access token
|
|
required: false
|
|
repository-url: # Canonical alias for `repository_url`
|
|
description: The repository URL to use
|
|
required: false
|
|
repository_url: # DEPRECATED ALIAS; TODO: Remove in v3+
|
|
description: >-
|
|
[DEPRECATED]
|
|
The repository URL to use
|
|
deprecationMessage: >-
|
|
The inputs have been normalized to use kebab-case.
|
|
Use `repository-url` instead.
|
|
required: false
|
|
default: https://upload.pypi.org/legacy/
|
|
packages-dir: # Canonical alias for `packages_dir`
|
|
description: The target directory for distribution
|
|
required: false
|
|
# default: dist # TODO: uncomment once alias removed
|
|
packages_dir: # DEPRECATED ALIAS; TODO: Remove in v3+
|
|
description: >-
|
|
[DEPRECATED]
|
|
The target directory for distribution
|
|
deprecationMessage: >-
|
|
The inputs have been normalized to use kebab-case.
|
|
Use `packages-dir` instead.
|
|
required: false
|
|
default: dist
|
|
verify-metadata: # Canonical alias for `verify_metadata`
|
|
description: Check metadata before uploading
|
|
required: false
|
|
# default: 'true' # TODO: uncomment once alias removed
|
|
verify_metadata: # DEPRECATED ALIAS; TODO: Remove in v3+
|
|
description: >-
|
|
[DEPRECATED]
|
|
Check metadata before uploading
|
|
deprecationMessage: >-
|
|
The inputs have been normalized to use kebab-case.
|
|
Use `verify-metadata` instead.
|
|
required: false
|
|
default: 'true'
|
|
skip-existing: # Canonical alias for `skip_existing`
|
|
description: >-
|
|
Do not fail if a Python package distribution
|
|
exists in the target package index
|
|
required: false
|
|
# default: 'false' # TODO: uncomment once alias removed
|
|
skip_existing: # DEPRECATED ALIAS; TODO: Remove in v3+
|
|
description: >-
|
|
[DEPRECATED]
|
|
Do not fail if a Python package distribution
|
|
exists in the target package index
|
|
deprecationMessage: >-
|
|
The inputs have been normalized to use kebab-case.
|
|
Use `skip-existing` instead.
|
|
required: false
|
|
default: 'false'
|
|
verbose:
|
|
description: Show verbose output.
|
|
required: false
|
|
default: 'false'
|
|
print-hash: # Canonical alias for `print_hash`
|
|
description: Show hash values of files to be uploaded
|
|
required: false
|
|
# default: 'false' # TODO: uncomment once alias removed
|
|
print_hash: # DEPRECATED ALIAS; TODO: Remove in v3+
|
|
description: >-
|
|
[DEPRECATED]
|
|
Show hash values of files to be uploaded
|
|
deprecationMessage: >-
|
|
The inputs have been normalized to use kebab-case.
|
|
Use `print-hash` instead.
|
|
required: false
|
|
default: 'false'
|
|
attestations:
|
|
description: >-
|
|
[EXPERIMENTAL]
|
|
Enable experimental support for PEP 740 attestations.
|
|
Only works with PyPI and TestPyPI via Trusted Publishing.
|
|
required: false
|
|
default: 'false'
|
|
branding:
|
|
color: yellow
|
|
icon: upload-cloud
|
|
runs:
|
|
using: docker
|
|
image: Dockerfile
|
|
args:
|
|
- ${{ inputs.user }}
|
|
- ${{ inputs.password }}
|
|
- ${{ inputs.repository-url }}
|
|
- ${{ inputs.packages-dir }}
|
|
- ${{ inputs.verify-metadata }}
|
|
- ${{ inputs.skip-existing }}
|
|
- ${{ inputs.verbose }}
|
|
- ${{ inputs.print-hash }}
|
|
- ${{ inputs.attestations }}
|