Skip to content

ci(release-auto): pass release title via env var (fix quote/;-injection)#293

Merged
doublegate merged 1 commit into
mainfrom
ci/fix-release-auto-title-quoting
Jul 12, 2026
Merged

ci(release-auto): pass release title via env var (fix quote/;-injection)#293
doublegate merged 1 commit into
mainfrom
ci/fix-release-auto-title-quoting

Conversation

@doublegate

Copy link
Copy Markdown
Owner

Fixes the root cause of v2.1.7 failing to auto-publish.

release-auto.yml's "Create tag + GitHub Release" step interpolated the CHANGELOG-derived title directly into the run: script via --title "${{ steps.notes.outputs.title }}". Because that title carries double quotes (the "Codename" + any quoted phrase) and shell metacharacters, splicing it into the command text broke quoting:

  • A codename-only header (v2.1.6 "Fathom" … "Timbre") merely had its quotes stripped (no error, mangled title).
  • v2.1.7's header — … honest DMA "unexpected read" residual ADR 0033; "Stepping") — split the quoted multi-word phrase into bare words, the shell read the ; as a command separator, and Stepping) globbed → no matches found → the auto-release failed. v2.1.7 was published manually.

Fix: pass tag / target / title / body-file through the step env: and reference them as shell variables ("$RELEASE_TITLE" …). Env-var expansion is quote-safe — titles keep their real quotes and any header content is handled literally. Protects the remaining v2.1.9 / v2.1.10 / v2.2.0 cuts.

No behavior change beyond correct/safe titles; YAML validated.

🤖 Generated with Claude Code

The 'Create tag + GitHub Release' step interpolated the CHANGELOG-derived title
straight into the run: script via ${{ steps.notes.outputs.title }}. Because the
title carries double quotes (the "Codename" plus any quoted phrase) and shell
metacharacters (';', '(', ')'), splicing it into the command text broke shell
quoting: a codename-only header merely had its quotes stripped, but v2.1.7's
header — '... honest DMA "unexpected read" residual ADR 0033; "Stepping")' —
split the quoted phrase into bare words and the shell read the ';' as a command
separator, then globbed 'Stepping)' → 'no matches found', failing the whole
auto-release (v2.1.7 never got tagged; published manually).

Fix: pass the tag, target, title, and body-file through the step 'env:' and
reference them as shell variables ("$RELEASE_TITLE" etc.). Env-var expansion
is quote-safe, so the release title keeps its real quotes and any header content
is handled literally — no injection, no glob, no separator surprises. Protects
every remaining v2.1.x release cut.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 12, 2026 06:49
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a GitHub Actions release automation failure mode where a CHANGELOG-derived release title containing quotes and shell metacharacters could break the gh release create command due to unsafe ${{ ... }} interpolation directly into the run: script.

Changes:

  • Routes dynamic values (tag, target SHA, title, notes file) through step-level env: and references them via shell variables in the gh release create command.
  • Adds explanatory comments documenting the injection/quoting failure mode and the rationale for the environment-variable approach.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@doublegate doublegate merged commit 89a54af into main Jul 12, 2026
20 checks passed
@doublegate doublegate deleted the ci/fix-release-auto-title-quoting branch July 12, 2026 07:06
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.

2 participants