File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
2- on : push
2+ on :
3+ push :
4+ branches :
5+ - ' releases/**'
36jobs :
47 build-n-publish :
58 name : Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
2831 with :
2932 password : ${{ secrets.TEST_PYPI_API_TOKEN }}
3033 repository_url : https://test.pypi.org/legacy/
31- skip_existing : true
3234 # - name: Publish distribution 📦 to PyPI
3335 # if: startsWith(github.ref, 'refs/tags')
3436 # uses: pypa/gh-action-pypi-publish@master
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66with open ("README.md" , "r" ) as fh :
77 long_description = fh .read ()
88
9- def get_version ():
10- """Get current version from code."""
11- regex = r"__version__\s=\s\"(?P<version>[\d\.]+?)\""
12- path = ("geocachingapi" , "__version__.py" )
13- return re .search (regex , read (* path )).group ("version" )
14-
159def read (* parts ):
1610 """Read file."""
1711 filename = os .path .join (os .path .abspath (os .path .dirname (__file__ )), * parts )
@@ -21,7 +15,6 @@ def read(*parts):
2115
2216setuptools .setup (
2317 name = "geocachingapi" ,
24- version = get_version (),
2518 author = "Rudolf Offereins" ,
2619 author_email = "r.offereins@gmail.com" ,
2720 description = "Python client for controlling the Geocaching API" ,
@@ -47,4 +40,6 @@ def read(*parts):
4740 python_requires = '>=3.8' ,
4841 zip_safe = False ,
4942 include_package_data = True ,
43+ use_scm_version = True ,
44+ setup_requires = ['setuptools_scm' ]
5045)
You can’t perform that action at this time.
0 commit comments