File tree Expand file tree Collapse file tree 3 files changed +44
-3
lines changed
Expand file tree Collapse file tree 3 files changed +44
-3
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+ name : CI/CD
5+
6+ on :
7+ push :
8+ pull_request :
9+ branches : [ dev ]
10+
11+ # This guards against unknown PR until a community member vet it and label it.
12+ types : [ labeled ]
13+
14+ jobs :
15+ cd :
16+ if : github.event_name == 'push' && (startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master')
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : actions/checkout@v3
20+ - name : Set up Python 3.9
21+ uses : actions/setup-python@v3
22+ with :
23+ python-version : 3.9
24+ - name : Build a package for release
25+ run : |
26+ python -m pip install build --user
27+ python -m build --sdist --wheel --outdir dist/ .
28+ - name : Publish to TestPyPI
29+ run : echo "Last time I tried, I do not have permission to release it on Test PyPI"
30+ - name : Publish to PyPI
31+ if : startsWith(github.ref, 'refs/tags')
32+ uses : pypa/gh-action-pypi-publish@v1.4.2
33+ with :
34+ user : __token__
35+ password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change 99 :license: BSD, see LICENSE for more details.
1010"""
1111
12- __version__ = '0.4.0 '
12+ __version__ = '0.4.1 '
1313
1414import os
1515
Original file line number Diff line number Diff line change 1212 <https://github.com/fengsp/flask-session/zipball/master#egg=Flask-dev>`_
1313
1414"""
15+ import re , io
1516from setuptools import setup
1617
18+ # setup.py shall not import main package
19+ __version__ = re .search (
20+ r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]' , # It excludes inline comment too
21+ io .open ('flask_session/__init__.py' , encoding = 'utf_8_sig' ).read ()
22+ ).group (1 )
1723
1824setup (
1925 name = 'Flask-Session' ,
20- version = '0.4.0' ,
26+ version = __version__ ,
2127 url = 'https://github.com/fengsp/flask-session' ,
2228 license = 'BSD' ,
2329 author = 'Shipeng Feng' ,
2935 include_package_data = True ,
3036 platforms = 'any' ,
3137 install_requires = [
32- 'Flask>=0.8' ,
38+ 'Flask>=0.8,<2.3' , # Flask 2.3 removed app.session_cookie_name
3339 'cachelib'
3440 ],
3541 test_suite = 'test_session' ,
You can’t perform that action at this time.
0 commit comments