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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file numops-0.0.6.tar.gz.
File metadata
- Download URL: numops-0.0.6.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4c91f954b69bf38c104c097c97e6a89d4c565928179d8b2740c308384339fe7
|
|
| MD5 |
da5ec9428d49a381e0c60bb2744540da
|
|
| BLAKE2b-256 |
9e82e21913e3aaa854a4062586674946d13ea9995aab085e28c3a5732f0b4482
|
File details
Details for the file numops-0.0.6-py3-none-any.whl.
File metadata
- Download URL: numops-0.0.6-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
371a4fa7b7ddcc3c8f179281ec835a8c96a59fcae21b8e433b5a293a1d77180d
|
|
| MD5 |
c209471cc65e148e32fb4309c3a84150
|
|
| BLAKE2b-256 |
d607b22c627c43e4da5583b57fa682a8a620cd8cc1e53ef9db3dd670450f4cd8
|