This commit is contained in:
parent
1c891689b4
commit
85b1673d0d
1 changed files with 3 additions and 3 deletions
|
|
@ -69,12 +69,12 @@ jobs:
|
||||||
|
|
||||||
if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then
|
if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then
|
||||||
echo "Creating release for ${TAG}..."
|
echo "Creating release for ${TAG}..."
|
||||||
JSON_PAYLOAD=$(printf '{"tag_name": "%s", "name": "%s"}' "$TAG" "$TAG")
|
echo '{"tag_name": "'"${TAG}"'", "name": "'"${TAG}"'"}' > /tmp/payload.json
|
||||||
echo "Payload: ${JSON_PAYLOAD}"
|
cat /tmp/payload.json
|
||||||
RESPONSE=$(curl -sv --http1.1 -X POST \
|
RESPONSE=$(curl -sv --http1.1 -X POST \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-H "Authorization: token ${FORGEJO_TOKEN}" \
|
-H "Authorization: token ${FORGEJO_TOKEN}" \
|
||||||
-d "$JSON_PAYLOAD" \
|
--data-binary @/tmp/payload.json \
|
||||||
"${API_BASE}/repos/${REPO}/releases" 2>&1)
|
"${API_BASE}/repos/${REPO}/releases" 2>&1)
|
||||||
echo "Full response: ${RESPONSE}"
|
echo "Full response: ${RESPONSE}"
|
||||||
RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
|
RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue