ci(release): publicar quando o CI passa na main (workflow_run) + dispatch manual#50
Merged
Merged
Conversation
…ispatch The release pipeline triggered only on a pushed 'v*' tag, but some release environments can't push tags. Drive it off CI instead: - Trigger on 'workflow_run' of the CI workflow (success on a push to main) and on manual 'workflow_dispatch'. No tag push required. - A gate job resolves the version from pyproject.toml and skips if v<version> is already released, so it's idempotent on every green CI run. - The GitHub Release job creates the v<version> tag at the released commit and publishes wheel+sdist to PyPI via OIDC. Notes come from the CHANGELOG slice. - Dropped the duplicated test matrix: CI is now the test gate. Kept inside release.yml so the PyPI Trusted Publisher (pinned to this filename + the 'pypi' environment) keeps working. https://claude.ai/code/session_016U8C9mmRh2hnAYZAtVPUee
3834fc3 to
761678b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexto
A release 0.22.0 já está na
main(pyproject.toml=0.22.0eholoctl/CHANGELOG.mdcom## [0.22.0] — 2026-06-15), mas a tagv0.22.0nunca foi criada e orelease.ymlsó disparava em push de tag — então o workflow nunca rodou. A última publicada no PyPI/GitHub Releases ainda é a v0.21.0. No ambiente onde a release é cortada, o proxy de git recusa push de tags, entãogit push --tagsnão funciona dali.O que muda
O
release.ymlpassa a ser dirigido pelo CI (testes), sem depender de push de tag:workflow_runno workflowCI: quando o CI termina com sucesso num push àmain, a release roda. Também aceitaworkflow_dispatch(manual).gate: resolve a versão dopyproject.tomle pula sev<versão>já tem release — idempotente a cada CI verde (não republica).v<versão>no commit lançado (target_commitish), com notas extraídas do CHANGELOG.release.ymlpara preservar o PyPI Trusted Publisher (fixado neste nome de arquivo + ambientepypi).Efeito ao mergear
Assim que este PR entrar na
maine o CI passar, a release 0.22.0 publica sozinha (tag + PyPI + GitHub Release). Daí em diante, todo commitchore: release X.Y.Zque passe no CI publica automaticamente; commits sem bump de versão são no-op (a guarda pula versões já lançadas).https://claude.ai/code/session_016U8C9mmRh2hnAYZAtVPUee