Fix version.json containing invalid JSON (literal newlines in notes)

Use jq to build version.json so multiline release notes are properly
escaped as \n sequences. Also fix current version.json for v1.0.4.
This commit is contained in:
superdooper86
2026-05-07 17:22:57 +02:00
parent dd68ff39d6
commit 9c030fcdd5
2 changed files with 7 additions and 16 deletions
+6 -7
View File
@@ -50,13 +50,12 @@ jobs:
- name: Update version.json
run: |
cat > version.json << JSON
{
"version": "${{ steps.version.outputs.version }}",
"url": "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/ClaudeChecker.zip",
"notes": "$(cat RELEASE_NOTES.md 2>/dev/null || echo 'Release ${{ steps.version.outputs.version }}')"
}
JSON
notes=$(cat RELEASE_NOTES.md 2>/dev/null || echo "Release ${{ steps.version.outputs.version }}")
jq -n \
--arg version "${{ steps.version.outputs.version }}" \
--arg url "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/ClaudeChecker.zip" \
--arg notes "$notes" \
'{version: $version, url: $url, notes: $notes}' > version.json
- name: Update Homebrew cask
run: |