diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 22861e5..dcb2bc2 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -11,18 +11,22 @@ jobs: runs-on: windows-2022 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v3 with: python-version: '3.x' - - name: Build and publish + - name: Install dependencies run: | python -m pip install --upgrade pip - pip install twine - pip install --upgrade setuptools - python setup.py sdist bdist_wheel - twine upload dist/* -u __token__ -p $PYPI_TOKEN + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} - uses: ncipollo/release-action@v1 with: artifacts: "" diff --git a/setup.py b/setup.py index da60fa0..2532e9d 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,14 @@ import setuptools -from underautomation.universal_robots.lib.version import VERSION with open('README.md', "r", encoding="utf-8") as fh: long_description = fh.read() +with open('underautomation/universal_robots/lib/version.txt', "r", encoding="utf-8") as fh: + version = fh.read() + setuptools.setup( name="UnderAutomation.UniversalRobots", - version=VERSION, + version=version, author="UnderAutomation", author_email="support@underautomation.com", description="Quickly create applications that communicate with your Universal Robots cobot", diff --git a/underautomation/universal_robots/lib/version.py b/underautomation/universal_robots/lib/version.py deleted file mode 100644 index 1ec9f98..0000000 --- a/underautomation/universal_robots/lib/version.py +++ /dev/null @@ -1 +0,0 @@ -VERSION="7.4.1.0" \ No newline at end of file diff --git a/underautomation/universal_robots/lib/version.txt b/underautomation/universal_robots/lib/version.txt new file mode 100644 index 0000000..b0e010d --- /dev/null +++ b/underautomation/universal_robots/lib/version.txt @@ -0,0 +1 @@ +7.4.1.0 \ No newline at end of file