Добавить автоматическую публикацию в Gitea Packages после успешного CI и обновить документацию о версиях пакетов
CI / Quality Checks (push) Successful in 12s
CI / Test Suite (push) Successful in 10s
CI / Publish to Gitea Packages (push) Failing after 9s

This commit is contained in:
ВяткинАртём
2026-05-27 17:41:59 +03:00
parent 2353a006a6
commit 7cc5b1ad06
4 changed files with 71 additions and 95 deletions
+6 -2
View File
@@ -1,6 +1,6 @@
UV := uv
.PHONY: format lint typecheck test ci-check build publish-gitea clean-branches
.PHONY: format lint typecheck test ci-check build package-version publish-gitea clean-branches
format:
$(UV) run ruff format .
@@ -23,16 +23,20 @@ ci-check:
build:
$(UV) build
package-version:
$(UV) run python -c "import tomllib; from pathlib import Path; print(tomllib.loads(Path('pyproject.toml').read_text(encoding='utf-8'))['project']['version'])"
publish-gitea:
@test -n "$$GITEA_PYPI_REPOSITORY_URL" || (echo "GITEA_PYPI_REPOSITORY_URL is required" && exit 1)
@test -n "$$GITEA_PACKAGE_USERNAME" || (echo "GITEA_PACKAGE_USERNAME is required" && exit 1)
@test -n "$$GITEA_PACKAGE_TOKEN" || (echo "GITEA_PACKAGE_TOKEN is required" && exit 1)
@echo "Publishing version $$($(MAKE) --no-print-directory package-version)"
$(UV) build
$(UV) run --with twine twine check dist/*
TWINE_REPOSITORY_URL="$$GITEA_PYPI_REPOSITORY_URL" \
TWINE_USERNAME="$$GITEA_PACKAGE_USERNAME" \
TWINE_PASSWORD="$$GITEA_PACKAGE_TOKEN" \
$(UV) run --with twine twine upload dist/*
$(UV) run --with twine twine upload --skip-existing dist/*
clean-branches:
ifeq ($(OS),Windows_NT)