Skip to content

Commit

Permalink
add version management in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Rufus31415 committed May 24, 2024
1 parent fb39f9d commit 80d8420
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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="[email protected]",
description="Quickly create applications that communicate with your Universal Robots cobot",
Expand Down
1 change: 0 additions & 1 deletion underautomation/universal_robots/lib/version.py

This file was deleted.

1 change: 1 addition & 0 deletions underautomation/universal_robots/lib/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.4.1.0

0 comments on commit 80d8420

Please sign in to comment.