ci: fix package publishing + add dev/main packages #65
Reference in New Issue
Block a user
Delete Branch "fix/package-publishing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root cause
.gitea/workflows/publish.ymltriggered only onpush: tags: v*, and the repo has zero tags. Merging tomainnever created a tag, so the publish workflow never ran and no package was ever built. The build/publish steps and theREGISTRY_TOKEN+github.actorcredentials were already proven working bydocker.yml, which pushes images to the same Gitea registry.Changes
ci:— rewrite publish.yml to publish on mergev*tags topushondevandmain.devpush →aegis-gitea-mcp-devatX.Y.Z.dev<run_number>(CI run number is monotonic, so every dev build is unique).mainpush → stableaegis-gitea-mcpatX.Y.Z. Usesuv publish --check-url, so amainpush that did not bump the version is a clean no-op (already-published files are skipped) instead of a hard 409.pyproject.tomlat build time only — the committed file keepsaegis-gitea-mcp/0.2.0.REGISTRY_TOKENis required (fail-closed) so the job never publishes anonymously.docs:— document both channelsdocs/packaging.mdnow describes the stable vs dev channels, install commands for each, that both ship the sameaegis_gitea_mcpmodule (install one or the other per environment), and the merge-driven release flow (bump version → PR intodev→ promotedev→main).Verified locally
uv buildproduces both wheel + sdist.pyproject.tomlstill parses; name/version unchanged.publish.ymlparses as YAML.ruff check src testsclean;pytestgreen at 84% coverage (>80% gate).Deviations
None. No
astral-sh/setup-uv@v5fallback was needed (kept as-is, consistent with docker.yml's use of third-party actions).After merge
Merging this into
devis itself the test — it should publishaegis-gitea-mcp-dev 0.2.0.dev<run>to the Gitea package registry. Stableaegis-gitea-mcpappears oncedevis promoted tomain. Pre-flight: a runner with theubuntu-latestlabel must be online and theREGISTRY_TOKENsecret's owning user must matchgithub.actoron dev/main pushes.