Skip to main content

No project description provided

Project description

Github Actions to update package on pypi

This repo is a reference code to automatically push the latest package release to pypi on creating a github release tags.

Step 1: Add required files

Pypi requires following files to build a package

  • setup.py
  • setup.cfg
  • README.md

Create a new file .github\workflows\publish-to-pypi.yml and copy paste below content.

name: Upload Python Package

on:
  release:
    types: [created]

jobs:
  deploy:
    runs-on: ubuntu-20.04

    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-python@v2
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools wheel twine
    - name: Build and publish
      env:
        TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
        TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*

Step 2: Update PYPI Creds

Next add pypi credentials in github secrets with following Keys under settings -> secrets.

  • PYPI_USERNAME
  • PYPI_PASSWORD

github action secret

Step 3: Create a release tag

On creation of release tag, github action will automatically start building distribution files and push them to pypi

Step 4: Check Actions

Check whether workflow actions has initiated or not.

Step 5: Validate by package installation

To validate whether package has been pushed to pypi or not.

Visit pypi website and search for the package name

pip install packagename

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

numops-0.0.5.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

numops-0.0.5-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file numops-0.0.5.tar.gz.

File metadata

  • Download URL: numops-0.0.5.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for numops-0.0.5.tar.gz
Algorithm Hash digest
SHA256 bb7e8cdb8ade78db527276dd82765403932d46b483b04dd24b92c75be1498753
MD5 40df3da049d3cdbb2dec0c9f5a6072f3
BLAKE2b-256 1dad1e33ec1bfc5c7a18dd85b991cb5379d7f3dbe8b57517802d3f103070f346

See more details on using hashes here.

File details

Details for the file numops-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: numops-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for numops-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b0d7918777102ebc951b7a8a1611639fc922e6e6b41a8853b7e3a0575a390dd6
MD5 ee0138e0f79b3fda024314883262e461
BLAKE2b-256 fff7d37dba33dc9dcde556bc71ca4c9eaf01bdcb65eddc5c38474d5242091c2d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page