From a274f53b6eb206a09d7e00c45d70bf29883c15b5 Mon Sep 17 00:00:00 2001 From: truePhilipp Date: Sat, 11 May 2024 01:01:24 +0200 Subject: [PATCH] dynamic version test --- .github/workflows/deploy.yml | 30 ++++++++++++++++++++++++++++++ html_to_django/__about__.py | 1 - pyproject.toml | 7 ++++--- 3 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/deploy.yml delete mode 100644 html_to_django/__about__.py diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..d8258a7 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,30 @@ +name: Deploy + +on: + push: + branches: + - 'main' + tags: + - 'v*.*.*' + pull_request: + branches: + - 'main' + tags: + - 'v*.*.*' + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.12"] + steps: + - uses: actions/checkout@v4 + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: pip install ".[dev]" + - name: Build on Python ${{ matrix.python-version }} + run: hatch build diff --git a/html_to_django/__about__.py b/html_to_django/__about__.py deleted file mode 100644 index f102a9c..0000000 --- a/html_to_django/__about__.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = "0.0.1" diff --git a/pyproject.toml b/pyproject.toml index 9d1eb3e..e1bf688 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["hatchling"] +requires = ["hatchling", "hatch-vcs"] build-backend = "hatchling.build" [project] @@ -29,7 +29,8 @@ test = [ "pycodestyle==2.11.1" ] dev = [ - "hatch==1.10.0" + "hatch==1.10.0", + "hatch-vcs==0.4.0" ] [project.urls] @@ -41,4 +42,4 @@ html_to_django = "html_to_django.converter:command_entry" html_to_django_r = "html_to_django.converter:command_entry_r" [tool.hatch.version] -path = "html_to_django/__about__.py" \ No newline at end of file +source = "vcs" \ No newline at end of file