Skip to content

Commit

Permalink
Merge pull request #9 from adrianlubitz/correct_version_upload
Browse files Browse the repository at this point in the history
Correct version upload
  • Loading branch information
adrianlubitz authored Mar 30, 2021
2 parents e219314 + fddda7e commit 16b1f78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Test
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: Set up Python
uses: actions/setup-python@v2
with:
Expand All @@ -28,6 +34,4 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
twine upload dist/*
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()

if 'VERSION' in os.environ:
VERSION = os.environ['VERSION']
if 'RELEASE_VERSION' in os.environ:
VERSION = os.environ['RELEASE_VERSION']
else:
VERSION = '0.0.0'

Expand Down

0 comments on commit 16b1f78

Please sign in to comment.