fix(ci): repair the release workflow's Windows version step - #237
Merged
Conversation
release.yml has failed to parse since before v0.6.0 work began, so every push to main produced a red run with zero jobs. It went unnoticed because the workflow only triggers on `push: tags: ["v*"]` and nothing has been tagged; GitHub still creates a run and fails it at parse time. The step at line 144 was a single-quoted YAML scalar where '' escapes a quote, and [''version'] carried one quote too few. That closed the scalar early and the remainder of the line became a syntax error. Fixing only the quote would have produced a workflow that parses and then fails at runtime. The same string used \" as an escape inside a PowerShell double- quoted string, and pwsh escapes with a backtick or a doubled quote, not a backslash. A block scalar removes both problems at once: no YAML quoting, and the PowerShell reads as ordinary PowerShell. The bash equivalent at line 57 was always correct because it is an unquoted scalar and needs no escaping. This brings the Windows step to the same intent. Verified: all four workflow files parse, this was the only pwsh step and the only quoted scalar with backslash escapes in the file, and the inner Python one-liner returns 0.6.0 against the current Cargo.toml. Not verified: the step's runtime behaviour on a Windows runner. pwsh is not available locally, and confirming it would require pushing a v* tag, which fires a real release. Out-File is left without an explicit -Encoding because shell: pwsh is PowerShell Core, which already writes UTF-8 without a BOM. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: docushell-dev <doqshell@gmail.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.
`release.yml` has failed to parse since before the v0.6.0 work, so every push to `main` produces a red run with zero jobs. It went unnoticed because the workflow only triggers on `push: tags: ["v*"]` and nothing has been tagged — GitHub still creates a run and fails it at parse time.
The bug
The Windows "derive candidate version" step was a single-quoted YAML scalar, where `''` escapes a quote. `[''version']` had one quote too few, closing the scalar early:
```yaml
run: '"value=$(python -c "...open(''Cargo.toml'',''rb''))[''workspace''][''package''][''version'])")" | Out-File ...'
```
Fixing only the quote would have produced a workflow that parses and then fails at runtime: the same string used `"` as an escape inside a PowerShell double-quoted string, and pwsh escapes with a backtick or a doubled quote, not a backslash.
A block scalar removes both problems — no YAML quoting, and the PowerShell reads as ordinary PowerShell. The bash equivalent at line 57 was always correct because it is an unquoted scalar; this brings the Windows step to the same intent.
Verified
Not verified
Runtime behaviour on a Windows runner. `pwsh` is not available locally, and confirming it would require pushing a `v*` tag, which fires a real release. `Out-File` is left without an explicit `-Encoding` because `shell: pwsh` is PowerShell Core, which already writes UTF-8 without a BOM.
🤖 Generated with Claude Code