I need to notify Sentry about new build version when CI made it. I am using runs-on: windows-latest
for builds and sending requests with a code below:
- name: Notify Sentry
run: |
$VERSION_NAME = "${{ github.ref_name }}"
$REQUEST = "{`"version`": `"$VERSION_NAME`"}"
echo $REQUEST
curl -X POST -H "Content-Type:application/json" -d "$REQUEST" "https://sentry.io/api/hooks/release/builtin/...id.../...token.../"
Request looks correct, but it always returns error Expecting property name enclosed in double quotes
:
Run $VERSION_NAME = "${{ github.ref_name }}"
$VERSION_NAME = "${{ github.ref_name }}"
$REQUEST = "{`"version`": `"$VERSION_NAME`"}"
echo $REQUEST
curl -X POST -H "Content-Type:application/json" -d "$REQUEST" "https://sentry.io/api/hooks/release/builtin/...id.../...token.../"
shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
{"version": "v1.1.1"}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 104 100 87 100 17 313 61 --:--:-- --:--:-- --:--:-- 375
100 104 100 87 100 17 313 61 --:--:-- --:--:-- --:--:-- 375
{"error":"Expecting property name enclosed in double quotes: line 1 column 2 (char 1)"}
In Postman it works well. How to fix this error?