Skip to content

Pypi upload

Actions
Uplaod package to pypi
v1
LatestPre-release
Star (3)

GitHub Action to release a python package to PyPI

This action uploads python distribution packages located in the dist/ directory to PyPI.

This action assumes that a python environment is set up. Python can be set up with conda as well

Usage

Upload packages to PyPI

- name: Publish a Python distribution to PyPI uses: ortega2247/pypi-upload-action@master with: user: __token__ password: ${{ secrets.pypi_password }}

To upload packages to TestPyPI

- name: Publish a Python distribution to PyPI uses: ortega2247/pypi-upload-action@master with: user: __token__ password: ${{ secrets.test_pypi_password }} repository_url: https://test.pypi.org/legacy/

If python distribution packages are located in a directory other than dist

- name: Publish a Python distribution to PyPI uses: ortega2247/pypi-upload-action@master with: user: __token__ password: ${{ secrets.test_pypi_password }} repository_url: https://test.pypi.org/legacy/ packages_dir: my_directory

Limit releases to tagged pushes

- name: Publish a Python distribution to PyPI if: startsWith(github.ref, 'refs/tags/') uses: ortega2247/pypi-upload-action@master with: user: __token__ password: ${{ secrets.test_pypi_password }} repository_url: https://test.pypi.org/legacy/ packages_dir: my_directory

To use this action you need to get an API token from PyPI. Then, use this token to create a GitHub secret

Pypi upload is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Uplaod package to pypi
v1
LatestPre-release

Pypi upload is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.