add pypi workflow

This commit is contained in:
gnzng
2025-06-23 15:38:44 -07:00
parent 8c216aa7e6
commit 2c764d4190
2 changed files with 31 additions and 1 deletions
+30
View File
@@ -0,0 +1,30 @@
name: Upload Python Package to PyPI when a Release is Created
on:
release:
types: [created]
jobs:
pypi-publish:
name: Publish release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/cdtools-py
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build package (setup.py)
run: |
python setup.py sdist bdist_wheel
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
+1 -1
View File
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="cdtools",
version="0.3.0",
version="0.3.1",
python_requires='>3.8', # recommended minimum version for pytorch 2.3.0
author="Abe Levitan",
author_email="abraham.levitan@psi.ch",