File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed
Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change 1+ name : release
2+ on :
3+ push :
4+ tags :
5+ - v*
6+ jobs :
7+ release :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v2
11+ - uses : actions/setup-python@v2
12+ with :
13+ python-version : ' 3.7'
14+ - name : build
15+ run : python setup.py ${GITHUB_REF#refs/tags/v} sdist bdist_wheel
16+ - name : release
17+ uses : pypa/gh-action-pypi-publish@master
18+ with :
19+ password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change 1- import io
21import re
2+ import sys
33
44from setuptools import find_packages , setup
55
66with open ("README.md" , "r" ) as fh :
77 long_description = fh .read ()
88
9- with io . open ( 'threescale_api/__init__.py' , 'rt' , encoding = 'utf8' ) as f :
10- VERSION = re .search ( r'__version__ = \'(.*?)\'' , f . read ()). group ( 1 )
9+ VERSION = sys . argv . pop ( 1 )
10+ assert re .match ( r"[0-9]+\.[0-9]+\.[0-9]+" , VERSION ), "Version definition required as first arg"
1111
1212requirements = ['requests' ]
1313
Original file line number Diff line number Diff line change 11# flake8: noqa
22from .client import ThreeScaleClient
3-
4- __version__ = '0.15.0'
You can’t perform that action at this time.
0 commit comments