diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 6e662fa..d468610 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -117,11 +117,15 @@ jobs: RELEASE_ID: ${{ steps.release.outputs.id }} VERSION: ${{ steps.version.outputs.version }} 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 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 \ -H "Authorization: token ${TOKEN}" \ -H "Content-Type: application/octet-stream" \ --data-binary @"${ASSET_PATH}" \ - "https://git.vodyanoysh.ru/api/v1/repos/vodyanoy/aero-mail/releases/${RELEASE_ID}/assets?name=${ASSET_NAME}" + "${URL}" done