diff --git a/.github/workflows/build_and_publish.yaml b/.github/workflows/build_and_publish.yaml new file mode 100644 index 0000000..d0595c2 --- /dev/null +++ b/.github/workflows/build_and_publish.yaml @@ -0,0 +1,56 @@ +name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI + +on: + release: + types: [created] + +jobs: + build: + name: Build distribution 📦 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: python3 -m build + - name: Store the distribution packages + uses: actions/upload-artifact@v4 + with: + name: python-package-distributions + path: dist/ + + publish-to-pypi: + name: >- + Publish Python 🐍 distribution 📦 to PyPI + if: github.repository_owner == 'kraken-tech' && github.ref_type == 'tag' + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/django-rest-framework-recursive + timeout-minutes: 5 + + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + + steps: + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://pypi.org/legacy/ diff --git a/CHANGELOG.md b/CHANGELOG.md index b6af44e..2e5d46d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [0.2.0] - 2024-08-22 + ### Added - Tested support for Python 3.10 -> 3.11 diff --git a/pyproject.toml b/pyproject.toml index b97ec00..d4edfdd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ name = "django-rest-framework-recursive" # Do not manually edit the version, use `make version_{type}` instead. # This should match the version in the [tool.bumpversion] section. -version = "0.1.0" +version = "0.2.0" dependencies = [ "django>=3.2", "djangorestframework>=3.12.0", @@ -137,7 +137,7 @@ filterwarnings = "error" [tool.bumpversion] # Do not manually edit the version, use `make version_{type}` instead. # This should match the version in the [project] section. -current_version = "0.1.0" +current_version = "0.2.0" parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)" serialize = ["{major}.{minor}.{patch}"] search = "{current_version}"