File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Build & Deploy to PyPI on Release
2+
3+ on :
4+ release :
5+ types : [released]
6+
7+ jobs :
8+ deploy :
9+ name : PyPI Deploy
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+ - uses : actions/setup-python@v2
14+ - id : dist
15+ uses : casperdcl/deploy-pypi@v2
16+ with :
17+ requirements : twine setuptools wheel
18+ build : true
19+ password : ${{ secrets.PYPI_TOKEN }}
20+ upload : true
Original file line number Diff line number Diff line change 11import setuptools
2- from statsapi import version
2+ from distutils .util import convert_path
3+
4+ # https://stackoverflow.com/questions/2058802/how-can-i-get-the-version-defined-in-setup-py-setuptools-in-my-package
5+ main_ns = {}
6+ ver_path = convert_path ("statsapi/version.py" )
7+ with open (ver_path ) as ver_file :
8+ exec (ver_file .read (), main_ns )
39
410with open ("README.md" , "r" ) as fh :
511 long_description = fh .read ()
612
713setuptools .setup (
814 name = "MLB-StatsAPI" ,
9- version = version . VERSION ,
15+ version = main_ns [ " VERSION" ] ,
1016 author = "Todd Roberts" ,
11171218 description = "MLB Stats API Wrapper for Python" ,
You can’t perform that action at this time.
0 commit comments