Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/commandcracker/pypi-publish
Automatically publish packages to PyPI and crete Tags and Releases
https://github.com/commandcracker/pypi-publish
actions pypi pypi-package python python3 release release-automation tagging upload workflow
Last synced: 7 days ago
JSON representation
Automatically publish packages to PyPI and crete Tags and Releases
- Host: GitHub
- URL: https://github.com/commandcracker/pypi-publish
- Owner: Commandcracker
- License: apache-2.0
- Created: 2022-05-31T18:38:56.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-28T14:32:25.000Z (6 months ago)
- Last Synced: 2024-10-14T09:44:21.058Z (about 1 month ago)
- Topics: actions, pypi, pypi-package, python, python3, release, release-automation, tagging, upload, workflow
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# pypi-publish
Automatically publish packages to PyPI and crete Tags and Releases
## Example workflow
**WARNING:** Do not enter any secrets in plain text! Add them as a env var in `settings/secrets/actions`.
You don't need to set `secrets.GITHUB_TOKEN` (its automatically set).
```yml
name: Publishon:
push:
branches:
- mainpermissions:
contents: writejobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v5- name: Set up Python 🧰
uses: actions/setup-python@v5
with:
python-version: 3.x- name: Install dependencies 🧰
env:
PIP_ROOT_USER_ACTION: ignore
run: |
python -m pip install --upgrade pip
pip install build- name: Build package 🔨
run: python -m build- name: Publish package 🚀
uses: Commandcracker/pypi-publish@v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
```## Inputs
| Input | Description | Required | Default |
|--------------------|---------------------------------------------------|----------|------------------------------------------------------------------------------------|
| `user` | `PyPI user` | `false` | `__token__` |
| `password` | `Password for the PyPI user or an access token` | `true` | |
| `repository` | `The repository URL for PyPI` | `false` | `https://pypi.python.org/pypi` |
| `verify_metadata` | `Check distribution metadata before uploading` | `false` | `true` |
| `verbose` | `Show verbose output.` | `false` | `false` |
| `print_hash` | `Show hash values of distribution to be uploaded` | `false` | `true` |
| `add_hash` | `Add hash values to release assets` | `false` | `true` |
| `github_token` | `${{ secrets.GITHUB_TOKEN }}` | `true` | |
| `prefix` | `Prefix to add to the version tag` | `false` | |
| `suffix` | `Suffix to add to the version tag` | `false` | |
| `releases_message` | `Message for the release` | `false` | `**View releases at**: [PyPI]({release_url})\n**Full Changelog**: {changelog_url}` |## Releases Message Variables
Set them like this: `{var_name}`
| Variable | Description |
|-------------------|-------------------------------------------------------------|
| `release_url` | `{repository_url}project/{package_name}/{package_version}/` |
| `changelog_url` | `https://github.com/{github_repository}/compare/?...?` |
| `package_name` | `Your package name` |
| `package_version` | `Your package version` |
| `prefix` | `same as the prefix input` |
| `suffix` | `same as the suffix input` |
| `tag_name` | `{prefix}{package_version}{suffix}` |