Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thevickypedia/pypi-publisher
Light weight, OS agnostic GitHub action to run PyPi publish
https://github.com/thevickypedia/pypi-publisher
composite-action github-action lightweight-framework os-agnostic pypi-packaging
Last synced: 11 days ago
JSON representation
Light weight, OS agnostic GitHub action to run PyPi publish
- Host: GitHub
- URL: https://github.com/thevickypedia/pypi-publisher
- Owner: thevickypedia
- License: mit
- Created: 2024-05-18T05:55:11.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-10-04T23:58:47.000Z (about 1 month ago)
- Last Synced: 2024-10-17T03:46:49.208Z (27 days ago)
- Topics: composite-action, github-action, lightweight-framework, os-agnostic, pypi-packaging
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![made-with-gha](https://img.shields.io/badge/Made%20with-Github_Actions-black?style=for-the-badge&logo=GitHub)][marketplace]
[![pages](https://github.com/thevickypedia/none-shall-pass/actions/workflows/pages/pages-build-deployment/badge.svg)][pages]
# PyPi Publisher
`pypi-publisher` is a GitHub action designed to upload python projects to Pypi repository.
## Install Guide
#### Add `pypi-publisher` action to your build workflow
- In your GitHub repository, select the Actions tab and either add or edit a workflow.
- Navigate to `pypi-publisher` in [Marketplace][marketplace].
- Copy and paste the yaml into your workflow.**[OR]**
Copy & paste the following workflow definition into your project `.github/workflows/pypi-publish.yml`
```yaml
name: PyPi Publisheron:
workflow_dispatch:
release:
types: [ published ]jobs:
pypi-publisher:
runs-on: ubuntu-latest
steps:
- uses: thevickypedia/pypi-publisher@v3
env:
token: ${{ secrets.PYPI_TOKEN }}
with:
skip-existing: true
```### Allowed Inputs
| Parameter | Description | Default |
|-------------------|---------------------------------------------------------|---------------------|
| `user` | PyPi username. | `__token__` |
| `token` | PyPi token. **[Mandatory]** | **NA** |
| `test-upload` | Uploads to [TestPyPi][test-pypi] repository. | `false` |
| `dry-run` | Builds the distribution without uploading to PyPi. | `false` |
| `repository-url` | PyPi repository URL. | [upload.pypi.org]** |
| `packages-dir` | The target directory for distribution. | `dist` |
| `verify-metadata` | Check metadata before uploading. | `true` |
| `skip-existing` | Avoids failing if distribution exists in package index. | `true` |
| `verbose` | Runs in verbose mode. | `false` |
| `print-hash` | Show hash values of distribution files. | `true` |
| `setup-python` | Uses the GH action `setup-python`. | `false`** |
| `python-version` | Python version for `setup-python`. | `3.9` |**Notes**
>- `repository-url` defaults to [upload.pypi.org], but it can change dynamically based on the `test-upload` flag.
>- `setup-python` defaults to `false`, but it can change dynamically based on whether `python` is installed in the runner.
>- `python-version` will be used only when `setup-python` flag is set to `true`, otherwise the default `python` in the runner takes precedence.> Only `user` and `token` can be passed as `env` whilst, rest of the parameters should be passed using `with`
## License & copyright
© Vignesh Rao
Licensed under the [MIT License][license]
[pages]: https://thevickypedia.github.io/pypi-publisher/
[license]: https://github.com/thevickypedia/pypi-publish/blob/main/LICENSE
[test-pypi]: https://test.pypi.org
[upload.pypi.org]: https://upload.pypi.org/legacy/
[marketplace]: https://github.com/marketplace/actions/pypi-publisher