From 1edc79068ec2afa564a915a4a17df8464054d251 Mon Sep 17 00:00:00 2001 From: Tom Carrick Date: Sat, 10 Feb 2024 16:13:24 +0100 Subject: [PATCH 1/2] Update build and release process --- .github/workflows/ci.yml | 31 ++++++++++++++++++------------- pyproject.toml | 8 ++++++-- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab39074..118ff48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -190,19 +190,24 @@ jobs: DB_PORT: ${{ job.services.mariadb.ports['3306'] }} release: - needs: [docs, lint, SQLite, PostgreSQL, MySQL, MariaDB] if: ${{ github.event_name == 'release' }} runs-on: ubuntu-latest + needs: [docs, lint, SQLite, PostgreSQL, MySQL, MariaDB] + environment: + name: pypi + url: https://pypi.org/p/django-rq-email-backend + permissions: + id-token: write steps: - - uses: actions/setup-python@v4 - - uses: actions/checkout@v3 - - name: build - run: | - python -m pip install build twine wheel - python -m build - - name: publish - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - TWINE_NON_INTERACTIVE: 1 - run: twine upload dist/* + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Check out code + uses: actions/checkout@v4 + - name: Install dependencies + run: python -m pip install -U pip wheel hatch + - name: Build package + run: hatch build + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index 1438385..6914819 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" [project] authors = [{ "name" = "Tom Carrick", "email" = "tom@carrick.eu" }] @@ -8,6 +8,10 @@ classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", + "Framework :: Django :: 3.2", + "Framework :: Django :: 4.2", + "Framework :: Django :: 5.0", + "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", From 193251fc44ca9123529bbc39ef0bc3d2f0a2ac7a Mon Sep 17 00:00:00 2001 From: Tom Carrick Date: Sat, 10 Feb 2024 16:21:52 +0100 Subject: [PATCH 2/2] Stick with setuptools for a bit --- .github/workflows/ci.yml | 4 ++-- pyproject.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 118ff48..5c9b438 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -206,8 +206,8 @@ jobs: - name: Check out code uses: actions/checkout@v4 - name: Install dependencies - run: python -m pip install -U pip wheel hatch + run: python -m pip install -U pip wheel build - name: Build package - run: hatch build + run: python -m build - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index 6914819..5465b4b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [project] authors = [{ "name" = "Tom Carrick", "email" = "tom@carrick.eu" }]