fix: improve package publish debugging and hardcode API URL
- Hardcode git.lethalbits.com instead of gitea.server_url variable - Replace brace expansion with separate glob patterns for POSIX compat - Add HTTP status code checking with response body on failure - Add debug output for URL, actor, and file listing
This commit is contained in:
@@ -43,12 +43,25 @@ jobs:
|
|||||||
done
|
done
|
||||||
- name: Publish nightly to Generic Package Registry
|
- name: Publish nightly to Generic Package Registry
|
||||||
run: |
|
run: |
|
||||||
for f in gitea-mcp-extended_*.{tar.gz,zip}; do
|
API_BASE="https://git.lethalbits.com/api/packages/lethalbits/generic/gitea-mcp-extended/nightly"
|
||||||
|
echo "Publishing to: $API_BASE"
|
||||||
|
echo "Actor: ${{ gitea.actor }}"
|
||||||
|
ls -la gitea-mcp-extended_*.tar.gz gitea-mcp-extended_*.zip 2>/dev/null || true
|
||||||
|
for f in gitea-mcp-extended_*.tar.gz gitea-mcp-extended_*.zip; do
|
||||||
[ -f "$f" ] || continue
|
[ -f "$f" ] || continue
|
||||||
|
echo "Uploading $f..."
|
||||||
# Delete old nightly file first (can't overwrite)
|
# Delete old nightly file first (can't overwrite)
|
||||||
curl -skf -X DELETE --user "${{ gitea.actor }}:${{ secrets.GITHUB_TOKEN }}" \
|
curl -k -X DELETE --user "${{ gitea.actor }}:${{ secrets.GITHUB_TOKEN }}" \
|
||||||
"${{ gitea.server_url }}/api/packages/lethalbits/generic/gitea-mcp-extended/nightly/${f}" || true
|
"${API_BASE}/${f}" || true
|
||||||
curl -skf --user "${{ gitea.actor }}:${{ secrets.GITHUB_TOKEN }}" \
|
HTTP_CODE=$(curl -k -o /tmp/upload_response -w '%{http_code}' \
|
||||||
|
--user "${{ gitea.actor }}:${{ secrets.GITHUB_TOKEN }}" \
|
||||||
--upload-file "$f" \
|
--upload-file "$f" \
|
||||||
"${{ gitea.server_url }}/api/packages/lethalbits/generic/gitea-mcp-extended/nightly/${f}"
|
"${API_BASE}/${f}")
|
||||||
|
echo "HTTP response: $HTTP_CODE"
|
||||||
|
if [ "$HTTP_CODE" -lt 200 ] || [ "$HTTP_CODE" -ge 300 ]; then
|
||||||
|
echo "Upload failed! Response body:"
|
||||||
|
cat /tmp/upload_response
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Uploaded $f successfully"
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -60,9 +60,21 @@ jobs:
|
|||||||
- name: Publish to Generic Package Registry
|
- name: Publish to Generic Package Registry
|
||||||
run: |
|
run: |
|
||||||
VERSION=${GITHUB_REF_NAME#v}
|
VERSION=${GITHUB_REF_NAME#v}
|
||||||
for f in gitea-mcp-extended_*.{tar.gz,zip}; do
|
API_BASE="https://git.lethalbits.com/api/packages/lethalbits/generic/gitea-mcp-extended/${VERSION}"
|
||||||
|
echo "Publishing to: $API_BASE"
|
||||||
|
ls -la gitea-mcp-extended_*.tar.gz gitea-mcp-extended_*.zip 2>/dev/null || true
|
||||||
|
for f in gitea-mcp-extended_*.tar.gz gitea-mcp-extended_*.zip; do
|
||||||
[ -f "$f" ] || continue
|
[ -f "$f" ] || continue
|
||||||
curl -skf --user "${{ gitea.actor }}:${{ secrets.GITHUB_TOKEN }}" \
|
echo "Uploading $f..."
|
||||||
|
HTTP_CODE=$(curl -k -o /tmp/upload_response -w '%{http_code}' \
|
||||||
|
--user "${{ gitea.actor }}:${{ secrets.GITHUB_TOKEN }}" \
|
||||||
--upload-file "$f" \
|
--upload-file "$f" \
|
||||||
"${{ gitea.server_url }}/api/packages/lethalbits/generic/gitea-mcp-extended/${VERSION}/${f}"
|
"${API_BASE}/${f}")
|
||||||
|
echo "HTTP response: $HTTP_CODE"
|
||||||
|
if [ "$HTTP_CODE" -lt 200 ] || [ "$HTTP_CODE" -ge 300 ]; then
|
||||||
|
echo "Upload failed! Response body:"
|
||||||
|
cat /tmp/upload_response
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Uploaded $f successfully"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user