From 7ebb80ba273bf08faa07a254215113d864f0619f Mon Sep 17 00:00:00 2001 From: Mark Jarvis <43512302+jarvisms@users.noreply.github.com> Date: Tue, 15 Mar 2022 09:42:55 +0000 Subject: [PATCH] Version Release and GitHub Action Version release 1.0.0 using new DCS Web API. Additional CI/CD workflow using GitHub Actions to autobuild and publish to PyPi (and Test PyPi) --- .github/workflows/publish-to-test-pypi.yml | 38 ++++++++++++++++++++++ setup.py | 6 +++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish-to-test-pypi.yml diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml new file mode 100644 index 0000000..0fab15f --- /dev/null +++ b/.github/workflows/publish-to-test-pypi.yml @@ -0,0 +1,38 @@ +# This workflow will upload a Python Package using Twine when a release is created +# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries +# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ + +name: Upload Python Package to TestPyPI and PyPI + +on: + release: + types: [published] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - name: Set up Python + uses: actions/setup-python@master + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package to TestPyPi + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + - name: Publish package to PyPi + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/setup.py b/setup.py index 0df7250..5d576ec 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pythondcs", - version="0.1.1", + version="1.0.0", author="Mark Jarvis", description="Python Module for interfacing with the Coherent Research DCS v3+ remote metering server", long_description=long_description, @@ -28,6 +28,10 @@ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Natural Language :: English",