Skip to content

Commit 1538177

Browse files
committed
f
1 parent 566df2e commit 1538177

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/python-publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@ jobs:
2222
run: |
2323
python -m pip install --upgrade pip
2424
pip install setuptools wheel twine
25+
- name: add version variable
26+
run: |
27+
export RELEASE_VERSION=${{ github.event.release.tag_name }}
28+
echo "::set-env name=RELEASE_VERSION::$RELEASE_VERSION"
2529
- name: Build and publish
2630
env:
2731
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
2832
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
2933
run: |
30-
python setup.py sdist bdist_wheel "${{ github.event.release.tag_name }}"
34+
python setup.py sdist bdist_wheel
3135
twine upload dist/*

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import sys
1+
import os
22
import setuptools
33

4-
v = sys.argv[3]
5-
sys.argv = sys.argv[:2]
4+
v = os.environ['RELEASE_VERSION']
5+
print('Version: ', v)
66

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

0 commit comments

Comments
 (0)