From fd9830559bd6e4322b6692e290c77d3441909876 Mon Sep 17 00:00:00 2001 From: Joe Kaufeld Date: Sat, 25 Mar 2023 21:22:03 -0400 Subject: [PATCH] pull out json data --- .github/workflows/build_and_release.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index fd6536f..25f70c3 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -29,16 +29,20 @@ jobs: make build - name: Create release! run: | + JSON_DATA=$( + printf '%s' \ + '{'\ + '"tag_name":"${{ env.CURRENT_TIME_VERSION }}",'\ + '"name":"${{ env.CURRENT_TIME_VERSION }}",'\ + '"body":"RELEASE THE KRAKEN"'\ + '}' \ + ) echo """release_id=$(\ curl -X POST \ -s https://git.joekaufeld.com/api/v1/repos/${GITHUB_REPOSITORY%/*}/${{ github.event.repository.name }}/releases \ -H "Authorization: token ${{ secrets.PAT }}" \ -H 'Content-Type: application/json' \ - -d '{\ - "tag_name":"${{ env.CURRENT_TIME_VERSION }}",\ - "name":"${{ env.CURRENT_TIME_VERSION }}",\ - "body":"RELEASE THE KRAKEN"\ - }' \ + -d $JSON_DATA \ | python3 -c "import sys, json; print(json.load(sys.stdin)['id'])"\ )""" >> $GITHUB_ENV - name: Upload assets!