Skip to content

ci(release): publicar quando o CI passa na main (workflow_run) + dispatch manual#50

Merged
FelipeCarillo merged 1 commit into
mainfrom
claude/new-release-main-p5i64a
Jun 15, 2026
Merged

ci(release): publicar quando o CI passa na main (workflow_run) + dispatch manual#50
FelipeCarillo merged 1 commit into
mainfrom
claude/new-release-main-p5i64a

Conversation

@FelipeCarillo

@FelipeCarillo FelipeCarillo commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Contexto

A release 0.22.0 já está na main (pyproject.toml = 0.22.0 e holoctl/CHANGELOG.md com ## [0.22.0] — 2026-06-15), mas a tag v0.22.0 nunca foi criada e o release.yml só 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ão git push --tags não funciona dali.

O que muda

O release.yml passa a ser dirigido pelo CI (testes), sem depender de push de tag:

  • Gatilho workflow_run no workflow CI: quando o CI termina com sucesso num push à main, a release roda. Também aceita workflow_dispatch (manual).
  • Job gate: resolve a versão do pyproject.toml e pula se v<versão> já tem release — idempotente a cada CI verde (não republica).
  • PyPI via OIDC + GitHub Release que cria a tag v<versão> no commit lançado (target_commitish), com notas extraídas do CHANGELOG.
  • Removida a matriz de testes duplicada do release: o CI passa a ser o portão de teste.
  • Mantido dentro do release.yml para preservar o PyPI Trusted Publisher (fixado neste nome de arquivo + ambiente pypi).

Efeito ao mergear

Assim que este PR entrar na main e o CI passar, a release 0.22.0 publica sozinha (tag + PyPI + GitHub Release). Daí em diante, todo commit chore: release X.Y.Z que passe no CI publica automaticamente; commits sem bump de versão são no-op (a guarda pula versões já lançadas).

Nota técnica: o gatilho workflow_run só passa a valer depois que este arquivo estiver na branch padrão (main) — comportamento padrão do GitHub Actions.

https://claude.ai/code/session_016U8C9mmRh2hnAYZAtVPUee

…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
@FelipeCarillo FelipeCarillo force-pushed the claude/new-release-main-p5i64a branch from 3834fc3 to 761678b Compare June 15, 2026 12:58
@FelipeCarillo FelipeCarillo changed the title ci(release): publicar release via workflow_dispatch (sem push de tag) ci(release): publicar quando o CI passa na main (workflow_run) + dispatch manual Jun 15, 2026
@FelipeCarillo FelipeCarillo merged commit 645a8d3 into main Jun 15, 2026
11 checks passed
@FelipeCarillo FelipeCarillo deleted the claude/new-release-main-p5i64a branch June 15, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants