Skip to content

Commit

Permalink
Fix auto-publish script and set correct version number (#16)
Browse files Browse the repository at this point in the history
* Attempt to fix auto-publish script

* Fix directory

* Fix directory

* Fix directory

* Fix

* Remove test branch
  • Loading branch information
bm1549 committed Apr 13, 2023
1 parent 9f74fa0 commit 3f07e0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/automatic-python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ jobs:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel --version ${{ steps.semvers.outputs.patch }}
sed -i.bak 's/SNAPSHOT/${{ steps.semvers.outputs.patch }}/' ./setup.py
python setup.py sdist bdist_wheel
twine upload dist/*
8 changes: 1 addition & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import setuptools
import sys

with open("README.md", "r") as fh:
long_description = fh.read()

# Default
# Overridden by publish GH Action
version = "SNAPSHOT"

if "--version" in sys.argv:
idx = sys.argv.index("--version")
sys.argv.pop(idx)
version = sys.argv.pop(idx)

print("Using version " + version)

setuptools.setup(
Expand Down

0 comments on commit 3f07e0d

Please sign in to comment.