ci(publish): passar NODE_AUTH_TOKEN no step do guard - #2
Merged
Merged
Conversation
O setup-node grava um .npmrc com o placeholder ${NODE_AUTH_TOKEN}. Sem a
env no step, o npm falha ao resolver o placeholder e o `npm view` do guard
retorna erro — dando falso-negativo (already=false) mesmo com a versão já
publicada, o que fez o job tentar republicar. Passar a env (leitura pública)
faz o guard detectar corretamente e pular o publish.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Corrige o guard adicionado no #1.
Bug: o
setup-nodegrava um.npmrccom o placeholder\${NODE_AUTH_TOKEN}. O stepVersão já publicada?rodavanpm viewsem essa env, então o npm falhava ao resolver o placeholder →npm viewretornava erro →already=false(falso-negativo) → o job tentava republicar uma versão que já existe.Fix: passar
NODE_AUTH_TOKENno step (é só leitura pública). Assim o guard detecta a versão existente e pula o publish, encerrando verde — o comportamento pretendido para Releases retroativos e re-runs.🤖 Generated with Claude Code