Skip to content

Commit

Permalink
Python versipn patch 1 (#66)
Browse files Browse the repository at this point in the history
* Update setup.py

* Update python-ci.yml

* Update python-publish.yml

* Update python-ci.yml

* Update python-publish.yml

* Update setup.py

* Update python-publish.yml

* Update python-publish.yml
  • Loading branch information
myifeng authored Jun 4, 2024
1 parent 62ae870 commit 5fbb7a1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,21 @@ jobs:
python -m pip install --upgrade pip
pip install pytest setuptools wheel twine build
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Get release version
id: get_version
run: |
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
echo "Release version: $VERSION"
echo ::set-output name=VERSION::$VERSION
else
echo "Not a release tag. Exiting."
exit 1
fi
- name: Update setup.py version
run: |
VERSION=${{ steps.get_version.outputs.VERSION }}
sed -i "s/version='0.0.0'/version='$VERSION'/" setup.py
- name: Build and test
run: |
python -m build
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def read_file(filename):

setup(
name="article-parser",
version='0.0.0',
author="myifeng",
author_email="[email protected]",
maintainer="myifeng",
Expand Down

0 comments on commit 5fbb7a1

Please sign in to comment.