Skip to content

fix(ci): repair the release workflow's Windows version step - #237

Merged
docushell-dev merged 1 commit into
mainfrom
fix-release-workflow-yaml
Aug 9, 2026
Merged

fix(ci): repair the release workflow's Windows version step#237
docushell-dev merged 1 commit into
mainfrom
fix-release-workflow-yaml

Conversation

@docushell-dev

Copy link
Copy Markdown
Collaborator

`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

  • All four workflow files parse
  • This was the only pwsh step and the only quoted scalar with backslash escapes in the file
  • The inner Python one-liner returns `0.6.0` against the current `Cargo.toml`

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

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>
@docushell-dev
docushell-dev merged commit 5cb9f9b into main Aug 9, 2026
11 checks passed
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