Skip to content

Commit 80d8420

Browse files
committed
add version management in setup.py
1 parent fb39f9d commit 80d8420

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

.github/workflows/Release.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,22 @@ jobs:
1111
runs-on: windows-2022
1212

1313
steps:
14-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v4
1515
- name: Set up Python
1616
uses: actions/setup-python@v3
1717
with:
1818
python-version: '3.x'
19-
- name: Build and publish
19+
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip
22-
pip install twine
23-
pip install --upgrade setuptools
24-
python setup.py sdist bdist_wheel
25-
twine upload dist/* -u __token__ -p $PYPI_TOKEN
22+
pip install build
23+
- name: Build package
24+
run: python -m build
25+
- name: Publish package
26+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
27+
with:
28+
user: __token__
29+
password: ${{ secrets.PYPI_TOKEN }}
2630
- uses: ncipollo/release-action@v1
2731
with:
2832
artifacts: ""

setup.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import setuptools
2-
from underautomation.universal_robots.lib.version import VERSION
32

43
with open('README.md', "r", encoding="utf-8") as fh:
54
long_description = fh.read()
65

6+
with open('underautomation/universal_robots/lib/version.txt', "r", encoding="utf-8") as fh:
7+
version = fh.read()
8+
79
setuptools.setup(
810
name="UnderAutomation.UniversalRobots",
9-
version=VERSION,
11+
version=version,
1012
author="UnderAutomation",
1113
author_email="[email protected]",
1214
description="Quickly create applications that communicate with your Universal Robots cobot",

underautomation/universal_robots/lib/version.py

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.4.1.0

0 commit comments

Comments
 (0)