Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca176c4c9b |
@@ -49,12 +49,20 @@ jobs:
|
||||
REPO="vantzs/corrosion-admin-panel"
|
||||
API_URL="https://git.corrosionmgmt.com/api/v1"
|
||||
|
||||
# Create release
|
||||
RELEASE_ID=$(curl -s -X POST \
|
||||
# Create release (parse ID without jq)
|
||||
RESPONSE=$(curl -s -X POST \
|
||||
-H "Authorization: token ${RELEASE_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"tag_name\": \"${VERSION}\", \"name\": \"Companion Agent ${VERSION}\", \"body\": \"Companion Agent release ${VERSION}\", \"draft\": false, \"prerelease\": false}" \
|
||||
"${API_URL}/repos/${REPO}/releases" | jq -r '.id')
|
||||
"${API_URL}/repos/${REPO}/releases")
|
||||
RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -1 | grep -o '[0-9]*')
|
||||
|
||||
if [ -z "$RELEASE_ID" ]; then
|
||||
echo "ERROR: Failed to create release. Response:"
|
||||
echo "$RESPONSE"
|
||||
exit 1
|
||||
fi
|
||||
echo "Release created with ID: ${RELEASE_ID}"
|
||||
|
||||
# Upload Linux binary
|
||||
curl -s -X POST \
|
||||
|
||||
Reference in New Issue
Block a user