Санитизация ID релиза и отладка URL при загрузке файлов
Some checks failed
Release / release (push) Failing after 7m3s
Some checks failed
Release / release (push) Failing after 7m3s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f3220d0859
commit
65d5e3668c
1 changed files with 5 additions and 1 deletions
|
|
@ -117,11 +117,15 @@ jobs:
|
||||||
RELEASE_ID: ${{ steps.release.outputs.id }}
|
RELEASE_ID: ${{ steps.release.outputs.id }}
|
||||||
VERSION: ${{ steps.version.outputs.version }}
|
VERSION: ${{ steps.version.outputs.version }}
|
||||||
run: |
|
run: |
|
||||||
|
RELEASE_ID=$(printf '%s' "${RELEASE_ID}" | tr -cd '0-9')
|
||||||
|
test -n "${RELEASE_ID}"
|
||||||
for ASSET_PATH in "dist/aero-mail-${VERSION}.AppImage" "dist/aero-mail-${VERSION}-win-x64.exe" "dist/aero-mail-${VERSION}-win-x64.exe.blockmap" dist/latest.yml; do
|
for ASSET_PATH in "dist/aero-mail-${VERSION}.AppImage" "dist/aero-mail-${VERSION}-win-x64.exe" "dist/aero-mail-${VERSION}-win-x64.exe.blockmap" dist/latest.yml; do
|
||||||
ASSET_NAME=$(basename "${ASSET_PATH}")
|
ASSET_NAME=$(basename "${ASSET_PATH}")
|
||||||
|
URL="https://git.vodyanoysh.ru/api/v1/repos/vodyanoy/aero-mail/releases/${RELEASE_ID}/assets?name=${ASSET_NAME}"
|
||||||
|
printf '%s' "${URL}" | od -c | head -20
|
||||||
curl --globoff --fail-with-body --silent --show-error -X POST \
|
curl --globoff --fail-with-body --silent --show-error -X POST \
|
||||||
-H "Authorization: token ${TOKEN}" \
|
-H "Authorization: token ${TOKEN}" \
|
||||||
-H "Content-Type: application/octet-stream" \
|
-H "Content-Type: application/octet-stream" \
|
||||||
--data-binary @"${ASSET_PATH}" \
|
--data-binary @"${ASSET_PATH}" \
|
||||||
"https://git.vodyanoysh.ru/api/v1/repos/vodyanoy/aero-mail/releases/${RELEASE_ID}/assets?name=${ASSET_NAME}"
|
"${URL}"
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue