Skip to content

Commit

Permalink
Update upload2release.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
WorkTimer authored Dec 20, 2019
1 parent 6d016c2 commit 8f41c63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion upload2release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ cat $GITHUB_EVENT_PATH
#RELEASE_ID=$(jq --raw-output '.release.id' $GITHUB_EVENT_PATH)
#echo RELEASE_ID = $RELEASE_ID

curl -v -H "Authorization: token ${GITHUB_TOKEN}" "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases"

RELEASE_ID=$(curl --fail \
-H "Authorization: token ${GITHUB_TOKEN}" \
"https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" |
jq --raw-output ".[] | select(.tag_name == \"$TAG\") | .id")
jq --raw-output ".[] | select(.tag_name == \"$TAG\") | .id")
echo RELEASE_ID = $RELEASE_ID

if [[ -z "${RELEASE_ID}" ]]; then
Expand Down

0 comments on commit 8f41c63

Please sign in to comment.