https://github.com/lfreleng-actions/pypi-version-check-action
Checks the Python package index for the presence of a package
https://github.com/lfreleng-actions/pypi-version-check-action
pypi python release-automation release-engineering
Last synced: 8 months ago
JSON representation
Checks the Python package index for the presence of a package
- Host: GitHub
- URL: https://github.com/lfreleng-actions/pypi-version-check-action
- Owner: lfreleng-actions
- License: other
- Created: 2025-03-16T16:08:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-07T18:16:15.000Z (about 1 year ago)
- Last Synced: 2025-04-07T19:28:36.163Z (about 1 year ago)
- Topics: pypi, python, release-automation, release-engineering
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📦 PyPI Package Check
Checks the Python package index for the presence of a package (and
optionally a specific release/version).
## pypi-version-check-action
## Usage Example
Pass the index query URL, along with Python package name and optionally the
package release/version to check.
```yaml
- name: "Checking package index for build/release"
id: check-package-index
uses: lfreleng-actions/pypi-version-check-action@main
with:
index_url: "https://pypi.org/simple"
package_name: "ITR"
package_version: "1.1.10"
```
Query URL examples:
- PyPI
- TestPyPI
## Inputs
| Variable Name | Required | Default | Description |
| --------------- | -------- | ------------------------- | -------------------------------------------- |
| PACKAGE_NAME | True | | Name of Python package to check |
| PACKAGE_VERSION | False | | Optional release/version to check |
| INDEX_URL | False | | The Python package index server URL to query |
| PRE_RELEASE | False | False | Also checks pre-release/development versions |
| EXIT_ON_FAIL | False | False | Set true to exit with error on failure |
Note: Leading "v" characters are automatically stripped, as the Python package
index uses purely numerical versioning.
## Outputs
| Variable Name | Mandatory | Description |
| ------------- | --------- | ---------------------------------------------- |
| PACKAGE_MATCH | True | Always reports the presence of the project |
| VERSION_MATCH | False | Reports a match when specific version provided |
## Implementation Details
This action uses the "pip index" command, which is an experimental command.
It may get removed/changed in a future release without prior warning.
To query development and pre-release packages, the action implementation uses
the "--pre" command-line flag to gather the required versioning information.