Skip to content

Commit

Permalink
Fix CI workflow
Browse files Browse the repository at this point in the history
Fix CI workflow for automatic PyPI publishing
  • Loading branch information
laubonghaudoi committed Jun 9, 2024
1 parent 90fe555 commit 53a08c0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
- name: Run tests
run: |
python -m unittest tests/test_judge.py
- name: Update version in setup.py
run: |
version=$(python -c "exec(open('cantofilter/version.py').read()); print(__version__)")
sed -i "s/version=.*/version='$version',/" setup.py
- name: Build and publish
env:
TWINE_USERNAME: __token__
Expand Down
2 changes: 1 addition & 1 deletion cantofilter/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.4"
__version__ = "1.1.0"
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
from setuptools import setup, find_packages
from cantofilter import __version__
# Read the version from cantofilter/version.py
version = {}
with open("cantofilter/version.py") as fp:
exec(fp.read(), version)

# Read the contents of your README file
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

setup(
name="canto-filter",
version=__version__,
version=version['__version__'],
author="CanCLID (Cantonese Computational Linguistics Infrastructure Development Workgroup)",
author_email="[email protected]",
description="粵文分類篩選器 Cantonese text filter",
Expand Down

0 comments on commit 53a08c0

Please sign in to comment.