From 8c736c1f2924954e9e4cfa9135d6529c2f3d8a49 Mon Sep 17 00:00:00 2001 From: rhengeveldbordex <113895083+rhengeveldbordex@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:06:23 +0200 Subject: [PATCH] Fix GitHub action --- .bumpversion.cfg | 8 -------- .github/workflows/python-publish.yml | 22 +++++++++++++++------- setup.py | 2 +- transsmart_connector/__init__.py | 1 - 4 files changed, 16 insertions(+), 17 deletions(-) delete mode 100644 .bumpversion.cfg diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index d915459..0000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,8 +0,0 @@ -[bumpversion] -current_version = 0.0.1 -commit = True -tag = True - -[bumpversion:file:setup.py] - -[bumpversion:file:transsmart_connector/__init__.py] diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 6a31ef6..37b3d47 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,3 +1,11 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + name: Publish Python Package on: @@ -28,27 +36,27 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build bump2version + pip install build bump - name: Bump version run: | - bump2version --config-file .bumpversion.cfg --allow-dirty --verbose minor - + bump + - name: Commit and push changes env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add . - git commit -m "Bump minor version [skip ci]" + git commit -am "Bump minor version [skip ci]" git push - + + - name: Build package run: python -m build - name: Publish package - uses: pypa/gh-action-pypi-publish@v1.4.2 + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/setup.py b/setup.py index 66c0642..4bd3b60 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="transsmart_connector", - version="0.0.1", + version="0.1.0", packages=find_packages(), install_requires=[ 'requests >= 2.31.0', diff --git a/transsmart_connector/__init__.py b/transsmart_connector/__init__.py index a1ede15..5a52a0a 100644 --- a/transsmart_connector/__init__.py +++ b/transsmart_connector/__init__.py @@ -1,2 +1 @@ -__version__ = "0.0.1" from .transsmart_connector import TranssmartConnector \ No newline at end of file