diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 79bd7b5c..e8524c9f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,13 +15,25 @@ jobs: steps: - uses: actions/checkout@v6 with: + fetch-depth: 0 + fetch-tags: true persist-credentials: false - name: Set up uv uses: astral-sh/setup-uv@v7 + with: + activate-environment: true + enable-cache: true + python-version: "3.14" + + - name: Set up Hatch and Twine + run: uv pip install hatch twine - name: Build package - run: uv build + run: hatch build + + - name: Validate package + run: twine check dist/* - name: Publish package to PyPI if: startsWith(github.event.ref, 'refs/tags') diff --git a/DEVELOP.rst b/DEVELOP.rst index 6675cad5..d39affdb 100644 --- a/DEVELOP.rst +++ b/DEVELOP.rst @@ -70,12 +70,14 @@ In the release branch: - Add a section for the new version in the ``CHANGES.rst`` file -- Commit your changes with a message like "prepare release x.y.z" +- Commit your changes with a message like "Release x.y.z" - Push to origin/ - Create a tag by running ``git tag -s `` and push it ``git push --tags``. - This will trigger a Github action which releases the new version to PyPi. + This will trigger a Github action which releases the new version to PyPI. + +- Announce the new release on the `GitHub Releases`_ page. On branch ``main``: @@ -113,7 +115,7 @@ The docs are automatically built from Git by `Read the Docs`_ and there is nothing special you need to do to get the live docs to update. .. _@crate/docs: https://github.com/orgs/crate/teams/docs -.. _buildout: https://pypi.python.org/pypi/zc.buildout +.. _GitHub Releases: https://github.com/crate/crate-python/releases .. _PyPI: https://pypi.python.org/pypi .. _Python versions: https://docs.astral.sh/uv/concepts/python-versions/ .. _Read the Docs: http://readthedocs.org diff --git a/pyproject.toml b/pyproject.toml index 2490f2ff..f8190cf6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,6 @@ name = "crate" dynamic = ["version"] description = "CrateDB Python Client" authors = [{ name = "Crate.io", email = "office@crate.io" }] -requires-python = ">=3.10" readme = "README.rst" license = "Apache-2.0" classifiers = [