From 96b8dddbd1f961cc9a4e9887a8211d17e8768415 Mon Sep 17 00:00:00 2001 From: Svyatoslav Shchipunov Date: Wed, 2 Oct 2024 10:18:53 +0700 Subject: [PATCH 1/2] fix: fix JSON parsing --- .github/workflows/run-release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run-release.yml b/.github/workflows/run-release.yml index 4e303234..7a7d66e7 100644 --- a/.github/workflows/run-release.yml +++ b/.github/workflows/run-release.yml @@ -43,11 +43,11 @@ jobs: ----------------------------------------------------- OpenWrt ${{ steps.get_release.outputs.release_tag }} -----------------------------------------------------" + curl -X POST https://api.github.com/repos/Slava-Shchipunov/awg-openwrt/releases \ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Content-Type: application/json" \ - -d '{ - "tag_name": "'${{ steps.get_release.outputs.release_tag }}'", - "name": "Build amnezia wg for all devices with openwrt '${{ steps.get_release.outputs.release_tag }}'", - "body": "'"${ART}"'\n\nAutomatically created release for OpenWRT '${{ steps.get_release.outputs.release_tag }}'." - }' \ No newline at end of file + -d "$(jq -n --arg tag "${{ steps.get_release.outputs.release_tag }}" \ + --arg name "Build amnezia wg for all devices with openwrt ${{ steps.get_release.outputs.release_tag }}" \ + --arg body "$ART\n\nAutomatically created release for OpenWRT ${{ steps.get_release.outputs.release_tag }}." \ + '{ tag_name: $tag, name: $name, body: $body }')" \ No newline at end of file From 8c467935c4e22b6403e0b99a464aa0e3456efcdd Mon Sep 17 00:00:00 2001 From: Svyatoslav Shchipunov Date: Wed, 2 Oct 2024 10:29:11 +0700 Subject: [PATCH 2/2] fix: fix JSON parsing --- .github/workflows/run-release.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run-release.yml b/.github/workflows/run-release.yml index 7a7d66e7..a940d6d0 100644 --- a/.github/workflows/run-release.yml +++ b/.github/workflows/run-release.yml @@ -34,16 +34,18 @@ jobs: - name: Create release in your repo if: steps.check_release.outputs.release_exists == 'false' run: | - ART=" - _______ ________ __ + ART=$(cat <