From 604f31372af965dffd622cea21591bf47eab602c Mon Sep 17 00:00:00 2001 From: Aaron Steers Date: Wed, 9 Apr 2025 17:23:20 -0700 Subject: [PATCH 1/6] try updated format --- .github/workflows/pypi_publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml index 03e339e12..95c0bcdcc 100644 --- a/.github/workflows/pypi_publish.yml +++ b/.github/workflows/pypi_publish.yml @@ -9,8 +9,8 @@ name: CDK Publish on: push: - tags: - - "v*" + # tags: + # - "v*" workflow_dispatch: inputs: version: @@ -51,7 +51,7 @@ jobs: - name: Detect Prerelease Version using Dunamai uses: mtkennerly/dunamai-action@v1 with: - args: --style pep440 + args: --style pep440 --format "{base}.post{distance}.dev0{commit}" env-var: DETECTED_VERSION - name: Detect Release Tag Version from git ref ('${{ github.ref_name }}') From 11c76239be734b5563075b12413c2ed1feace96e Mon Sep 17 00:00:00 2001 From: Aaron Steers Date: Wed, 9 Apr 2025 17:25:03 -0700 Subject: [PATCH 2/6] remove --style --- .github/workflows/pypi_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml index 95c0bcdcc..8ad5171df 100644 --- a/.github/workflows/pypi_publish.yml +++ b/.github/workflows/pypi_publish.yml @@ -51,7 +51,7 @@ jobs: - name: Detect Prerelease Version using Dunamai uses: mtkennerly/dunamai-action@v1 with: - args: --style pep440 --format "{base}.post{distance}.dev0{commit}" + args: --format "{base}.post{distance}.dev0{commit}" env-var: DETECTED_VERSION - name: Detect Release Tag Version from git ref ('${{ github.ref_name }}') From 89be2dea3ea6bfcb9f77b1b83f2d313f027683bb Mon Sep 17 00:00:00 2001 From: Aaron Steers Date: Wed, 9 Apr 2025 17:28:09 -0700 Subject: [PATCH 3/6] remove style --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 292f3db9d..d236c0b9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,6 @@ version = "0.0.0" # Version will be calculated dynamically. [tool.poetry-dynamic-versioning] enable = true -style = "pep440" # Ensures compatibility with PyPI [tool.poetry.dependencies] python = ">=3.10,<3.13" From 4ad0d05892ecdec3afa35c2510fd47022ae32700 Mon Sep 17 00:00:00 2001 From: Aaron Steers Date: Wed, 9 Apr 2025 17:32:44 -0700 Subject: [PATCH 4/6] use run-id --- .github/workflows/pypi_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml index 8ad5171df..1cd3b43fb 100644 --- a/.github/workflows/pypi_publish.yml +++ b/.github/workflows/pypi_publish.yml @@ -51,7 +51,7 @@ jobs: - name: Detect Prerelease Version using Dunamai uses: mtkennerly/dunamai-action@v1 with: - args: --format "{base}.post{distance}.dev0{commit}" + args: --format "{base}.post{distance}.dev${{ github.run_id }}" env-var: DETECTED_VERSION - name: Detect Release Tag Version from git ref ('${{ github.ref_name }}') From 048b4c817e2ee014f5b9027362e66e15a249a9d5 Mon Sep 17 00:00:00 2001 From: Aaron Steers Date: Wed, 9 Apr 2025 17:37:14 -0700 Subject: [PATCH 5/6] don't fail if user overrides detected --- .github/workflows/pypi_publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml index 1cd3b43fb..7c7af5918 100644 --- a/.github/workflows/pypi_publish.yml +++ b/.github/workflows/pypi_publish.yml @@ -80,8 +80,8 @@ jobs: INPUT_VERSION="${INPUT_VERSION#v}" # Fail if detected version is non-empty and different from the input version if [ -n "${DETECTED_VERSION:-}" ] && [ -n "${INPUT_VERSION:-}" ] && [ "${DETECTED_VERSION}" != "${INPUT_VERSION}" ]; then - echo "Error: Version input '${INPUT_VERSION}' does not match detected version '${DETECTED_VERSION}'." - exit 1 + echo "Warning: Version input '${INPUT_VERSION}' does not match detected version '${DETECTED_VERSION}'." + echo "Using input version '${INPUT_VERSION}' instead." fi # Set the version to the input version if non-empty, otherwise the detected version VERSION="${INPUT_VERSION:-$DETECTED_VERSION}" From ddd491a3f0aa1d332cd6f3ffb71fdf025431b752 Mon Sep 17 00:00:00 2001 From: "Aaron (\"AJ\") Steers" Date: Wed, 9 Apr 2025 17:40:16 -0700 Subject: [PATCH 6/6] Update .github/workflows/pypi_publish.yml --- .github/workflows/pypi_publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml index 7c7af5918..51084e9cf 100644 --- a/.github/workflows/pypi_publish.yml +++ b/.github/workflows/pypi_publish.yml @@ -9,8 +9,8 @@ name: CDK Publish on: push: - # tags: - # - "v*" + tags: + - "v*" workflow_dispatch: inputs: version: