Skip to content

Commit 7a4f365

Browse files
committed
ci: verbose release upload logging + final release API dump
1 parent e575343 commit 7a4f365

1 file changed

Lines changed: 23 additions & 5 deletions

File tree

.github/workflows/prebuild.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,23 +164,41 @@ jobs:
164164
env:
165165
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
166166

167-
- name: Upload prebuild assets to draft release
167+
- name: Upload prebuild assets to draft release (verbose)
168168
shell: bash
169169
env:
170170
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
171171
run: |
172172
set -euo pipefail
173+
echo "create_release outputs:"
174+
echo " upload_url: '${{ steps.create_release.outputs.upload_url }}'"
175+
echo " api url: '${{ steps.create_release.outputs.url }}'"
173176
UPLOAD_URL="${{ steps.create_release.outputs.upload_url }}"
174177
if [ -z "$UPLOAD_URL" ]; then
175-
echo "No upload_url from create_release step"
178+
echo "ERROR: No upload_url from create_release step"
176179
exit 1
177180
fi
181+
# show files we will upload
182+
echo "Files in release-assets:"
183+
ls -la release-assets || true
184+
178185
for f in release-assets/*; do
179186
[ -f "$f" ] || continue
180187
fname=$(basename "$f")
181-
echo "Uploading $fname to $UPLOAD_URL"
182-
curl -sS -X POST \
188+
echo "---> Uploading $fname to $UPLOAD_URL"
189+
# Use verbose curl and capture HTTP status and response body
190+
resp_file="/tmp/upload_resp_${fname}"
191+
http_status=$(curl -sS -o "$resp_file" -w "%{http_code}" -X POST \
183192
-H "Authorization: token ${GITHUB_TOKEN}" \
184193
-H "Content-Type: application/zip" \
185-
--data-binary @"$f" "${UPLOAD_URL}?name=$fname"
194+
--data-binary @"$f" "${UPLOAD_URL}?name=$fname") || true
195+
echo "HTTP status: $http_status"
196+
echo "Response body for $fname:" && cat "$resp_file" || true
197+
echo "curl exit code: $?"
186198
done
199+
200+
# After uploads, query the release to list attached assets
201+
REPO_API="https://api.github.com/repos/${{ github.repository }}"
202+
RELEASE_API="$REPO_API/releases/tags/v${{ steps.version.outputs.VERSION }}"
203+
echo "Querying release API: $RELEASE_API"
204+
curl -sS -H "Authorization: token ${GITHUB_TOKEN}" "$RELEASE_API" || true

0 commit comments

Comments
 (0)