Skip to content

This repository serves as a comprehensive template for streamlining the process of publishing Python packages to both PyPI and TestPyPI using GitHub Actions and shell scripts. The template includes everything you need to get started quickly and efficiently, from workflow files to setup and publishing scripts.

Notifications You must be signed in to change notification settings

itsjustshubh/pypi-publisher-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPI Publisher Template

This repository is a template for publishing Python packages to PyPI and TestPyPI using GitHub Actions and shell scripts.

Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/pypi-publisher-template.git
    cd pypi-publisher-template
  2. Run the setup script:

    chmod +x setup.sh
    ./setup.sh
  3. Update your .env file with your PyPI and TestPyPI tokens:

    TEST_PYPI_API_TOKEN=your_test_pypi_token_here
    PYPI_API_TOKEN=your_pypi_token_here
    
    BASE_URL=your_base_url_here

Publishing

To TestPyPI

Run the following command to publish to TestPyPI:

chmod +x publish_test.sh
./publish_test.sh

To PyPI

Run the following command to publish to PyPI:

chmod +x publish_pypi.sh
./publish_pypi.sh

Workflow

The GitHub Actions workflow is configured to publish to PyPI on tag creation and push to the main branch. Make sure to configure your repository secrets with the required tokens.

License

This project is licensed under the MIT License.

About

This repository serves as a comprehensive template for streamlining the process of publishing Python packages to both PyPI and TestPyPI using GitHub Actions and shell scripts. The template includes everything you need to get started quickly and efficiently, from workflow files to setup and publishing scripts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages