From f00fb16a7f450b3d8713596e6405637249cf80f9 Mon Sep 17 00:00:00 2001 From: Gonzalo Rafuls Date: Tue, 30 Dec 2025 10:51:27 -0300 Subject: [PATCH 1/2] CI: Modified release process --- .bumpversion.cfg | 2 +- .github/workflows/publish.yml | 33 ++------------------------------- CONTRIBUTING.rst | 10 ++++++++++ 3 files changed, 13 insertions(+), 32 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index b0b2f33..0028624 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -2,7 +2,7 @@ current_version = 0.1.8 commit = True tag = True -message = "Bump version: {current_version} → {new_version} [skip ci]" +message = "Bump version: {current_version} → {new_version} [publish]" [bumpversion:file:setup.py] search = version="{current_version}" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cee962a..01a0ecc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,7 +7,7 @@ on: jobs: publish: - if: github.actor != 'github-actions[bot]' + if: github.actor != 'github-actions[bot]' && contains(github.event.head_commit.message, '[publish]') runs-on: ubuntu-latest permissions: @@ -28,40 +28,11 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine bump2version - - - name: Configure Git - run: | - git config --global user.email "grafuls@gmail.com" - git config --global user.name "Your Name" - - - name: Bump version - run: | - # Keep bumping until we find a version without an existing tag - for i in {1..10}; do - NEW_VERSION=$(bump2version --dry-run --list patch | grep new_version | sed -r 's/^.*=//') - if git rev-parse "v${NEW_VERSION}" >/dev/null 2>&1; then - echo "Tag v${NEW_VERSION} already exists, bumping past it..." - bump2version patch --no-tag --no-commit --allow-dirty - else - echo "Bumping to v${NEW_VERSION}" - bump2version patch - break - fi - done + pip install setuptools wheel twine - name: Build package run: python setup.py sdist bdist_wheel - - name: Sync changes with all branches - run: | - git checkout latest - git pull origin latest --rebase - git push origin latest - git checkout development - git merge latest - git push origin development - - name: Publish package env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 3173008..e53f504 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -73,6 +73,16 @@ For merging, you should: 3. Add a note to ``CHANGELOG.rst`` about the changes. 4. Add yourself to ``AUTHORS.rst``. +Release Process +=============== + +To release a new version, run the following command:: + + bumpversion patch + +This will increment the version number and commit the changes. + + Tips ---- From 0cb9c3c33dacb78d06c065f5c97a8ac3b303e62c Mon Sep 17 00:00:00 2001 From: Gonzalo Rafuls Date: Tue, 30 Dec 2025 11:00:56 -0300 Subject: [PATCH 2/2] =?UTF-8?q?"Bump=20version:=200.1.8=20=E2=86=92=200.1.?= =?UTF-8?q?9=20[publish]"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- docs/conf.py | 2 +- setup.py | 2 +- src/quads_lib/__init__.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 0028624..f82f2c5 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.1.8 +current_version = 0.1.9 commit = True tag = True message = "Bump version: {current_version} → {new_version} [publish]" diff --git a/docs/conf.py b/docs/conf.py index 3625d9a..924206a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,7 +15,7 @@ year = "2025" author = "Gonzalo Rafuls" copyright = f"{year}, {author}" -version = release = "0.1.8" +version = release = "0.1.9" pygments_style = "trac" templates_path = ["."] diff --git a/setup.py b/setup.py index 000f906..ef1813d 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ def read(*names, **kwargs): setup( name="quads-lib", - version="0.1.8", + version="0.1.9", license="LGPL-3.0-only", description="Python client library for interacting with the QUADS API", long_description="{}\n{}".format( diff --git a/src/quads_lib/__init__.py b/src/quads_lib/__init__.py index 32d45c8..0526669 100644 --- a/src/quads_lib/__init__.py +++ b/src/quads_lib/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.1.8" +__version__ = "0.1.9" from .quads import QuadsApi