Skip to content

Commit f847275

Browse files
committed
Fix quote stripping issue.
1 parent bf447db commit f847275

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

.github/actions/get-versions/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ runs:
230230
231231
if [ "$HTTP_CODE" = "200" ]; then
232232
if echo "$BODY" | jq -e '.versions' > /dev/null 2>&1; then
233-
VERSIONS=$(echo "$BODY" | jq -c '.versions')
233+
# Ensure all versions are strings in the JSON array to easily compare later
234+
VERSIONS=$(echo "$BODY" | jq -c '[.versions[] | tostring]')
234235
LATEST=$(echo "$BODY" | jq -r '.versions[-1] // ""')
235236
236237
echo "Latest NuGet version: $LATEST"

.github/workflows/patchright_release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ jobs:
6565
- name: Determine target version
6666
id: decide
6767
run: |
68-
PLAYWRIGHT="${{ steps.versions.outputs.playwright_version }}"
69-
PATCHRIGHT="${{ steps.versions.outputs.patchright_version }}"
70-
NUGET_VERSION="${{ steps.versions.outputs.nuget_version }}"
71-
NUGET_VERSIONS="${{ steps.versions.outputs.nuget_versions }}"
72-
DRIVER="${{ steps.versions.outputs.driver_version }}"
73-
DRIVER_AVAILABLE="${{ steps.versions.outputs.driver_available }}"
74-
PLAYWRIGHT_MAJOR_MINOR="${{ steps.versions.outputs.playwright_major_minor }}"
75-
IS_DRIVER_UPDATE="${{ github.event.inputs.driver_update_release }}"
68+
PLAYWRIGHT='${{ steps.versions.outputs.playwright_version }}'
69+
PATCHRIGHT='${{ steps.versions.outputs.patchright_version }}'
70+
NUGET_VERSION='${{ steps.versions.outputs.nuget_version }}'
71+
NUGET_VERSIONS='${{ steps.versions.outputs.nuget_versions }}'
72+
DRIVER='${{ steps.versions.outputs.driver_version }}'
73+
DRIVER_AVAILABLE='${{ steps.versions.outputs.driver_available }}'
74+
PLAYWRIGHT_MAJOR_MINOR='${{ steps.versions.outputs.playwright_major_minor }}'
75+
IS_DRIVER_UPDATE='${{ github.event.inputs.driver_update_release }}'
7676
7777
echo "=== Version Info ==="
7878
echo "Playwright .NET : $PLAYWRIGHT"
@@ -123,7 +123,7 @@ jobs:
123123
echo "No versions found on NuGet.org"
124124
else
125125
# Check if version exists in the array
126-
if echo "$NUGET_VERSIONS" | jq -e --arg ver "$TARGET_VERSION" '.[] | select(. == $ver)' > /dev/null 2>&1; then
126+
if echo "$NUGET_VERSIONS" | jq -e --arg ver "$TARGET_VERSION" 'any(. == $ver)' > /dev/null 2>&1; then
127127
echo "Version $TARGET_VERSION exists on NuGet.org (release is immutable)"
128128
NUGET_EXISTS=true
129129
else

0 commit comments

Comments
 (0)