fix: remove jq dependency from Gitea release step
Use grep and sed instead of jq to parse JSON response, as jq is not available on all Gitea runners.
This commit is contained in:
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
@@ -116,7 +116,7 @@ jobs:
|
||||
TAG_VERSION="${GITHUB_REF#refs/tags/}"
|
||||
|
||||
# Create release via API
|
||||
RELEASE_ID=$(curl -X POST \
|
||||
RESPONSE=$(curl -s -X POST \
|
||||
-H "Accept: application/json" \
|
||||
-H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
@@ -130,7 +130,10 @@ jobs:
|
||||
"prerelease": false
|
||||
}
|
||||
EOF
|
||||
)" | jq -r '.id')
|
||||
)")
|
||||
|
||||
# Extract release ID using grep and sed (no jq dependency)
|
||||
RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -1 | grep -o '[0-9]*')
|
||||
|
||||
echo "Created release with ID: $RELEASE_ID"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user