Skip to content

fix(release): fazer checkout e recuperar publicação de tag existente - #29

Merged
rodri-oliveira-dev merged 7 commits into
mainfrom
fix/release-checkout-recovery
Sep 23, 2026
Merged

rodri-oliveira-dev merged 7 commits into
mainfrom
fix/release-checkout-recovery

Conversation

@rodri-oliveira-dev

@rodri-oliveira-dev rodri-oliveira-dev commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Causa

O run 35905127462 criou a tag v1.0.0, mas o comando gh release create falhou com fatal: not a git repository porque o job não fazia checkout. A tag permanece no commit 651c9f2d577c959fb1e574950f73bca1a99096c9; a release não foi publicada.

Correção

  • Adiciona actions/checkout fixado por SHA, com persist-credentials: false e histórico completo para verificar a ancestralidade das tags em recuperação.
  • Mantém o fluxo padrão criando somente novas tags, sem --force, reset, remoção ou movimentação de referências existentes.
  • Adiciona recover_existing_tag (false por padrão) para completar uma release cuja tag leve já existe: exige que ela aponte a um commit ancestral do main atual, rejeita release já existente e publica sem modificar a tag.
  • Conserva validações de branch e revisão atual antes da operação de escrita; usa --verify-tag e --repo na publicação.
  • Atualiza teste da política e README em ambos os idiomas.

Recuperação da v1.0.0

Depois de integrar este PR e confirmar CI verde, acesse Actions → Publish release → Run workflow; selecione main, informe 1.0.0 e marque recover_existing_tag. Não exclua, recrie nem mova a tag existente. Nenhuma tag ou release é publicada pelo PR.

Validação

O workflow Validate deste PR é responsável por Shell validation e Clean container lifecycle. Os testes Bats verificam as invariantes do novo fluxo; a publicação real só deve acontecer depois do merge e da proteção de tags estar ativa.

Summary by CodeRabbit

  • New Features
    • Added an explicit recovery option for publishing a release from an existing tag. Recovery is allowed only for tags in the current main history that do not already have a release; the tag remains unchanged.
  • Documentation
    • Updated release guides to explain the recovery option and workflow.
  • Tests
    • Added checks for recovery eligibility and release publishing behavior.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@changeset-bot

changeset-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f1d482c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: fe53ed00-d700-4d7a-8d6d-fa834edbc40d

📥 Commits

Reviewing files that changed from the base of the PR and between 651c9f2 and f1d482c.

📒 Files selected for processing (4)
  • .github/workflows/release.yml
  • README.md
  • README.pt-BR.md
  • tests/ci-policy.bats
 ______________________________________________________________
< Ad Astra Per Codicem Fixis. To the stars through code fixes. >
 --------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@rodri-oliveira-dev
rodri-oliveira-dev merged commit d124108 into main Sep 23, 2026
2 of 3 checks passed
@rodri-oliveira-dev
rodri-oliveira-dev deleted the fix/release-checkout-recovery branch September 23, 2026 18:55
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.

1 participant