Repair unparseable publish workflow - #9
Merged
Merged
Conversation
publish-nuget.yaml has been invalid YAML since #6 merged. A PowerShell here-string needs its body and closing "@ to start at column 0, and that un-indents straight out of the enclosing `run: |` block scalar: YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key (121:13) GitHub could not parse the file, so it could not apply the `on:` filters either. Every push produced a startup failure with zero jobs, including pushes to feature branches that the tag filter should have excluded. Those failures were invisible from the pull request checks, because this workflow is not one of them. The consequence: v0.1.2 was tagged and released on GitHub, but nothing published. nuget.org still lists 0.1.1 only, and neither the tag push nor the new workflow_run trigger ever ran. Build the message by concatenation instead, so every line stays inside the block scalar. Verified with a YAML parser this time rather than by reading: the previous file raises the exception above, the new one parses and keeps all three triggers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XnzCrAM46SttZnU6msznyN
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.
What happened
publish-nuget.yamlhas been invalid YAML since #6 merged. I introduced a PowerShell here-string in the exact-tag guard:A here-string requires its body and closing
"@to begin at column 0. That un-indents straight out of the enclosingrun: |block scalar:Why it went unnoticed
GitHub could not parse the file, so it could not apply the
on:filters either. Every push produced a startup failure with zero jobs — including pushes to feature branches thattags: ['v*']should have excluded. Six such runs accumulated.None of them appeared in pull request checks, because this workflow is not a PR check. The PRs stayed green while the publisher was dead.
The consequence
v0.1.2was tagged and its GitHub release published successfully — that is a different workflow. But nothing reached nuget.org:Neither the tag push nor the new
workflow_runtrigger ever ran. Theworkflow_runmechanism from #8 is therefore still unproven; it has not had a chance to fire.The fix
Build the message by concatenation so every line stays inside the block scalar. No behaviour change to the guard itself.
Verified with a YAML parser rather than by reading it:
mainYAMLException … (121:13)push,workflow_runandworkflow_dispatchall intactAfter merge
v0.1.2already exists, so its tag-push event is spent. The publish will need one manual dispatch to catch up; the exact-tag guard will pass, sincemainsits onv0.1.2. The automatic path gets its first real test atv0.1.3.Worth a follow-up: a workflow-lint check that runs as a PR check, so an unparseable workflow fails visibly instead of silently.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XnzCrAM46SttZnU6msznyN