From e0357d2cc68d771efe7f5b3333ca62a5896866a6 Mon Sep 17 00:00:00 2001 From: staticdev Date: Sat, 18 Jan 2025 17:23:59 +0100 Subject: [PATCH] Return release workflow with tag --- .github/workflows/release.yml | 27 ++++++--------------------- pyproject.toml | 7 +++++-- src/human_readable/__about__.py | 1 - 3 files changed, 11 insertions(+), 24 deletions(-) delete mode 100644 src/human_readable/__about__.py diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d46bac5..2cc832c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,12 @@ name: Release on: - push: - branches: - - main + workflow_dispatch: + inputs: + tags: + description: Release Tag + required: true + type: string jobs: release: @@ -33,24 +36,6 @@ jobs: pip install --constraint=.github/workflows/hatch-constraints.txt hatch hatch --version - - name: Check if there is a parent commit - id: check-parent-commit - run: | - echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)" - - - name: Detect and tag new version - id: check-version - if: steps.check-parent-commit.outputs.sha - uses: salsify/action-detect-and-tag-new-version@v2 - with: - version-command: | - bash -o pipefail -c "hatch version" - - - name: Bump version for developmental release - if: "! steps.check-version.outputs.tag" - run: | - hatch version b - - name: Install UV uses: astral-sh/setup-uv@v5 diff --git a/pyproject.toml b/pyproject.toml index a118723..103cc44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,10 @@ requires-python = ">=3.9" dependencies = [] [tool.hatch.version] -path = "src/human_readable/__about__.py" +source = "vcs" + +[tool.hatch.version.raw-options] +local_scheme = "no-local-version" [dependency-groups] dev = [ @@ -72,5 +75,5 @@ module = ["pytest_mock"] ignore_missing_imports = true [build-system] -requires = ["hatchling"] +requires = ["hatchling", "hatch-vcs"] build-backend = "hatchling.build" diff --git a/src/human_readable/__about__.py b/src/human_readable/__about__.py deleted file mode 100644 index bf25615..0000000 --- a/src/human_readable/__about__.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = "1.4.1"