From cbf5df0492ae4d5dab9843a938b51745f7b1a281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Vannicatte?= Date: Thu, 26 Dec 2024 11:27:51 +0100 Subject: [PATCH] chore: release v4 (#338) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 🧭 What and Why 🎟 Related Issue: https://algolia.atlassian.net/browse/DI-3248 ### Changes included: ``` 2024-12-26 4.0.0 * [MAJOR] drop support for python <3.8 [#336](https://github.com/algolia/algoliasearch-django/pull/336) * [MAJOR] drop support for django <4.0 [#336](https://github.com/algolia/algoliasearch-django/pull/336) * [MAJOR] remove method `clear_index` in favor of `clear_objects` [#336](https://github.com/algolia/algoliasearch-django/pull/336) ``` --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++++++++ ChangeLog | 5 +++++ tox.ini | 8 +++----- 3 files changed, 44 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb72981..18711f7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -95,4 +95,40 @@ jobs: source python-ci-run/bin/activate pip3 install --upgrade pip pip3 install tox + python -m pip install -U build TOXENV=${{ matrix.toxenv }} ALGOLIA_APPLICATION_ID=${{ secrets.ALGOLIA_APPLICATION_ID }} ALGOLIA_API_KEY=${{ secrets.ALGOLIA_API_KEY }} tox + python -m build + + release: + name: Publish + runs-on: ubuntu-22.04 + environment: + name: pypi + url: https://pypi.org/p/algoliasearch-django + permissions: + id-token: write + needs: + - build + if: | + always() && + !contains(needs.*.result, 'cancelled') && + !contains(needs.*.result, 'failure') + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.13 + + - name: deps and build + run: | + pip3 install --upgrade pip + python -m pip install -U build + python -m build + + - name: Publish algoliasearch package to PyPI + if: | + github.ref == 'refs/heads/master' && + startsWith(github.event.head_commit.message, 'chore: release') + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/ChangeLog b/ChangeLog index 004e223..4fa87ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ CHANGELOG +2024-12-26 4.0.0 + * [MAJOR] drop support for python <3.8 [#336](https://github.com/algolia/algoliasearch-django/pull/336) + * [MAJOR] drop support for django <4.0 [#336](https://github.com/algolia/algoliasearch-django/pull/336) + * [MAJOR] remove method `clear_index` in favor of `clear_objects` [#336](https://github.com/algolia/algoliasearch-django/pull/336) + 2023-04-27 3.0.0 * [MAJOR] drop python 2.7, update tox and CI run env (#331) * [FEAT] Add support for Python 3.9, 3.10 and 3.11 (#329) diff --git a/tox.ini b/tox.ini index 592e645..b351f18 100644 --- a/tox.ini +++ b/tox.ini @@ -30,6 +30,7 @@ twine = >=5.1,<6.0 wheel = >=0.45,<1.0 ruff = >=0.7.4,<1.0 pyright = >=1.1.389,<2.0 +setuptools = >=75.0,<76.0 [testenv:coverage] basepython = python3.13 @@ -52,18 +53,15 @@ commands = coverage report coveralls -[testenv:release] +[testenv:build] basepython = python3.13 deps = twine {[versions]twine} wheel {[versions]wheel} -passenv = - PYPI_USER - PYPI_PASSWORD + setuptools {[versions]setuptools} commands = python setup.py sdist bdist_wheel twine check dist/* - twine upload -u {env:PYPI_USER} -p {env:PYPI_PASSWORD} --repository-url https://upload.pypi.org/legacy/ dist/* [testenv:lint] deps =