Skip to content

Commit

Permalink
Merge branch 'release-0.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
rayluo committed Apr 30, 2023
2 parents 9f591b5 + 51ff1b0 commit b5c48b8
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 3 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: CI/CD

on:
push:
pull_request:
branches: [ dev ]

# This guards against unknown PR until a community member vet it and label it.
types: [ labeled ]

jobs:
cd:
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Build a package for release
run: |
python -m pip install build --user
python -m build --sdist --wheel --outdir dist/ .
- name: Publish to TestPyPI
run: echo "Last time I tried, I do not have permission to release it on Test PyPI"
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion flask_session/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:license: BSD, see LICENSE for more details.
"""

__version__ = '0.4.0'
__version__ = '0.4.1'

import os

Expand Down
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@
<https://github.com/fengsp/flask-session/zipball/master#egg=Flask-dev>`_
"""
import re, io
from setuptools import setup

# setup.py shall not import main package
__version__ = re.search(
r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', # It excludes inline comment too
io.open('flask_session/__init__.py', encoding='utf_8_sig').read()
).group(1)

setup(
name='Flask-Session',
version='0.4.0',
version=__version__,
url='https://github.com/fengsp/flask-session',
license='BSD',
author='Shipeng Feng',
Expand All @@ -29,7 +35,7 @@
include_package_data=True,
platforms='any',
install_requires=[
'Flask>=0.8',
'Flask>=0.8,<2.3', # Flask 2.3 removed app.session_cookie_name
'cachelib'
],
test_suite='test_session',
Expand Down

0 comments on commit b5c48b8

Please sign in to comment.