Skip to content

fix(cli): quote release tag passed to SignPath#1525

Merged
ChiragAgg5k merged 1 commit into
masterfrom
fix/signpath-version-quoting
May 11, 2026
Merged

fix(cli): quote release tag passed to SignPath#1525
ChiragAgg5k merged 1 commit into
masterfrom
fix/signpath-version-quoting

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

Problem

The Windows-signing step on sdk-for-cli's 20.2.0-rc.1 release failed with:

Run signpath/github-action-submit-signing-request@b9d91eadd323de506c0c81cf0c7fe7438f3360fd
Submitting the signing request to SignPath GitHub Actions connector...
Error: Invalid parameter value: 20.2.0-rc.1 - SyntaxError: Unexpected non-whitespace character after JSON at position 4 (line 1 column 5). Only valid JSON strings are allowed.

SignPath's GitHub Action parses each parameter VALUE as JSON. 20.2.0-rc.1 is not a valid JSON literal (numbers can't have multiple dots; strings must be quoted), so the action errors at position 4 (the second . after 20.2).

Stable tags like 20.1.0 happened to almost parse as JSON numbers, which is why this bug only surfaced once we cut a pre-release tag with a dotted/dashed suffix.

Fix

Wrap the release tag in double quotes inside parameters: so SignPath sees version: "20.2.0-rc.1" — a valid JSON string.

parameters: |
-  version: ${{ github.event.release.tag_name }}
+  version: "${{ github.event.release.tag_name }}"

Companion PR

A direct hotfix has been applied to sdk-for-cli so the existing 20.2.0-rc.1 release can be re-run: appwrite/sdk-for-cli#313.

Test plan

  • Regenerate sdk-for-cli after this merges and confirm the produced .github/workflows/publish.yml has the quoted version.
  • Cut another pre-release tag (e.g., 20.2.0-rc.2) and verify SignPath accepts the parameter.

SignPath's GitHub Action parses each parameter value as JSON, so a bare
20.2.0-rc.1 fails with a SyntaxError at position 4. Wrap the value in
double quotes so it's interpreted as a JSON string. Stable tags like
20.1.0 happened to almost parse as JSON numbers, masking the bug.
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 11, 2026

Greptile Summary

This PR fixes a Windows code-signing failure caused by SignPath's GitHub Action parsing the parameters block as JSON — unquoted version strings like 20.2.0-rc.1 are not valid JSON, while simpler tags like 20.1.0 were coincidentally accepted as partial number parses.

  • One-character fix: wraps ${{ github.event.release.tag_name }} in double quotes inside the YAML literal block, so SignPath receives version: "20.2.0-rc.1" — a well-formed JSON string — on every release, including pre-release tags with dots and dashes.

Confidence Score: 5/5

Safe to merge — the change is a single-line quoting fix in a CI workflow template with no logic, no new dependencies, and a clear root-cause explanation.

The single changed line correctly wraps the tag name in double quotes inside the YAML literal block, which is the standard way to ensure SignPath receives a valid JSON string regardless of tag format. The fix is minimal, targeted, and directly addresses the documented failure.

No files require special attention.

Important Files Changed

Filename Overview
templates/cli/.github/workflows/publish.yml Wraps github.event.release.tag_name in double quotes within the SignPath parameters block so pre-release tags with multiple dots or dashes are treated as valid JSON strings rather than invalid JSON number literals.

Reviews (1): Last reviewed commit: "fix(cli): quote release tag passed to Si..." | Re-trigger Greptile

@ChiragAgg5k ChiragAgg5k merged commit 6200ef9 into master May 11, 2026
56 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