From cb89795077d043d6cd93fc5088f71ef005572c01 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Wed, 29 Oct 2025 13:42:46 +0545 Subject: [PATCH] feat: publish package to pypi workflow and rename package to djinitx --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 39 +++++++++++++++++++++++++++++++++++ pyproject.toml | 13 +++++++++++- setup.py | 3 ++- 4 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d942002..24bb3ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,11 +31,11 @@ jobs: - name: Lint with Ruff run: | - ruff check src/ + ruff check djinit/ - name: Check formatting with Ruff run: | - ruff format --check src/ + ruff format --check djinit/ - name: Test CLI import run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e83d18f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + build-and-publish: + name: Build and Publish to PyPI + 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 dependencies + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build package + run: | + python -m build + + - name: Check package + run: | + twine check dist/* + + - name: Publish to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: | + twine upload dist/* diff --git a/pyproject.toml b/pyproject.toml index 6a6a81a..b053ef7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "djinit" +name = "djinitx" version = "0.1.0" description = "A CLI tool to setup Django project" readme = "README.md" @@ -8,6 +8,17 @@ authors = [ { name = "Sankalp Tharu", email = "sankalptharu50028@gmail.com" } ] license = { text = "MIT" } +keywords = [ + "django", + "cli", + "project", + "djinit", + "djinitx", + "dj", + "django-init", + "django project", + "django starter" +] classifiers=[ "Programming Language :: Python", "Programming Language :: Python :: 3", diff --git a/setup.py b/setup.py index 940d543..0e1d3da 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import find_packages, setup setup( - name="djinit", + name="djinitx", version="0.1.0", description="A CLI tool to setup Django projects", long_description=open("README.md").read(), @@ -49,6 +49,7 @@ setup( "cli", "project", "djinit", + "djinitx", "dj", "django-init", "django project",