DEVX-38: fix: clean dist/ before build and add workflow_dispatch to publish
Post-merge / detect-type (push) Successful in 8s
Post-merge / configure-repo (push) Successful in 11s
Post-merge / validate-commit-msg (push) Successful in 15s
Post-merge / release (push) Successful in 46s
Post-merge / vikunja (push) Successful in 14s
Post-merge / badges (push) Successful in 42s
Post-merge / sync-wiki (push) Successful in 48s

This commit was merged in pull request #62.
This commit is contained in:
2026-06-24 19:02:02 +00:00
parent 7fa1c4450c
commit cb037aa69c
3 changed files with 29 additions and 3 deletions
+7
View File
@@ -23,6 +23,7 @@ import os
import shutil
import subprocess # nosec B404
import sys
from pathlib import Path
import click
from dotenv import load_dotenv # pyright: ignore[reportMissingImports,reportUnknownVariableType]
@@ -60,6 +61,12 @@ def generate_release_notes(tag: str) -> str:
def build_package() -> None:
"""Build the Python package using python -m build."""
# Clean dist/ to avoid uploading stale packages from previous builds
# (Gitea PyPI returns 409 Conflict for already-published versions).
dist_dir = Path("dist")
if dist_dir.exists():
shutil.rmtree(dist_dir)
result = subprocess.run( # nosec B603
[sys.executable, "-m", "build"],
capture_output=True,