Skip to content

Commit

Permalink
Merge pull request #15 from Slava-Shchipunov/fix/fix-release-sync-wor…
Browse files Browse the repository at this point in the history
…kflow

fix: fix JSON parsing
  • Loading branch information
Slava-Shchipunov authored Oct 2, 2024
2 parents c7be956 + 8c46793 commit 2b1de64
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/run-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,22 @@ jobs:
- name: Create release in your repo
if: steps.check_release.outputs.release_exists == 'false'
run: |
ART="
_______ ________ __
ART=$(cat <<EOF
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| A M N E Z I A W I R E G U A R D
-----------------------------------------------------
OpenWrt ${{ steps.get_release.outputs.release_tag }}
-----------------------------------------------------"
|__| A M N E Z I A W I R E G U A R D
-----------------------------------------------------
OpenWrt ${{ steps.get_release.outputs.release_tag }}
-----------------------------------------------------
EOF
)

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 }}'."
}'
-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 }')"

0 comments on commit 2b1de64

Please sign in to comment.