Skip to content

Commit 3e82436

Browse files
authored
ci(hotfix): update version detection format in workflow (#471)
1 parent 168c1ab commit 3e82436

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/pypi_publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- name: Detect Prerelease Version using Dunamai
5252
uses: mtkennerly/dunamai-action@v1
5353
with:
54-
args: --style pep440
54+
args: --format "{base}.post{distance}.dev${{ github.run_id }}"
5555
env-var: DETECTED_VERSION
5656

5757
- name: Detect Release Tag Version from git ref ('${{ github.ref_name }}')
@@ -80,8 +80,8 @@ jobs:
8080
INPUT_VERSION="${INPUT_VERSION#v}"
8181
# Fail if detected version is non-empty and different from the input version
8282
if [ -n "${DETECTED_VERSION:-}" ] && [ -n "${INPUT_VERSION:-}" ] && [ "${DETECTED_VERSION}" != "${INPUT_VERSION}" ]; then
83-
echo "Error: Version input '${INPUT_VERSION}' does not match detected version '${DETECTED_VERSION}'."
84-
exit 1
83+
echo "Warning: Version input '${INPUT_VERSION}' does not match detected version '${DETECTED_VERSION}'."
84+
echo "Using input version '${INPUT_VERSION}' instead."
8585
fi
8686
# Set the version to the input version if non-empty, otherwise the detected version
8787
VERSION="${INPUT_VERSION:-$DETECTED_VERSION}"

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ version = "0.0.0" # Version will be calculated dynamically.
2727

2828
[tool.poetry-dynamic-versioning]
2929
enable = true
30-
style = "pep440" # Ensures compatibility with PyPI
3130

3231
[tool.poetry.dependencies]
3332
python = ">=3.10,<3.13"

0 commit comments

Comments
 (0)