https://github.com/ietf-tools/pypi-publish
Tool for publishing a Python package to PyPI from a GitHub Release
https://github.com/ietf-tools/pypi-publish
cli publish pypi
Last synced: 29 days ago
JSON representation
Tool for publishing a Python package to PyPI from a GitHub Release
- Host: GitHub
- URL: https://github.com/ietf-tools/pypi-publish
- Owner: ietf-tools
- License: bsd-3-clause
- Created: 2022-01-31T22:28:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-29T22:37:08.000Z (over 2 years ago)
- Last Synced: 2025-04-14T08:07:58.361Z (about 1 month ago)
- Topics: cli, publish, pypi
- Language: JavaScript
- Homepage:
- Size: 107 KB
- Stars: 12
- Watchers: 7
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
[](https://github.com/ietf-tools/pypi-publish/releases)
[](https://github.com/ietf-tools/pypi-publish/blob/main/LICENSE)
[](https://www.npmjs.com/package/@ietf-tools/pypi-publish)
[](https://github.com/ietf-tools/pypi-publish)
##### Tool for publishing a Python package to PyPI from a GitHub Release
- [Changelog](https://github.com/ietf-tools/pypi-publish/blob/main/CHANGELOG.md)
- [Contributing](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md)
- [Requirements](#requirements)
- [Usage](#usage)---
This tool is a CLI which provides the following automation:
- Fetch the list of available repositories and releases
- Download the latest build of a Python package
- Install Twine *(if not already installed)*
- Sign and publish the package to PyPI (or TestPyPI)## Requirements
- [Node.js](https://nodejs.org/) **16.x or later**
- [Python](https://www.python.org/) **3.x**> This tool assumes that you have the signing key used to sign Python packages already configured on your system. It will be used when publishing the package to PyPI.
## Usage
Install the `@ietf-tools/pypi-publish` NPM package globally using:
```sh
npm install -g @ietf-tools/pypi-publish
```Then run *(from any location)*:
```sh
pypi-publish
```Enter the necessary info as prompted.
### CLI Arguments *(optional)*
These arguments can also be passed to the CLI to automate values and bypass the questions. All arguments are optional.
| Short | Long | Description |
|---------------|-----------------------|---------------------------------------------|
| `-t TARGET` | `--target=TARGET` | Target PyPI repository [`pypi`, `testpypi`] |
| `-a TOKEN` | `--token=TOKEN` | PyPI API Token |
| `-i IDENTITY` | `--identity=IDENTITY` | GPG identity to use for package signing |
| `-p PROJECT` | `--project=PROJECT` | GitHub project (repository) to publish from |
| `-r RELEASE` | `--release=RELEASE` | GitHub release to publish |
| | `--python-path=PATH` | Path to Python executable |
| `-h` | `--help` | Display usage + help message and exit |
| `-v` | `--version` | Display CLI version and exit |## License
BSD-3-Clause