ID релиза передаётся через файл вместо outputs
Some checks failed
Release / release (push) Failing after 6m27s
Some checks failed
Release / release (push) Failing after 6m27s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a798025423
commit
cb7706ca90
1 changed files with 2 additions and 4 deletions
|
|
@ -109,20 +109,18 @@ jobs:
|
|||
"https://git.vodyanoysh.ru/api/v1/repos/vodyanoy/aero-mail/releases")
|
||||
|
||||
RELEASE_ID=$(printf '%s' "$RELEASE" | node -e 'let input = ""; process.stdin.on("data", chunk => { input += chunk }); process.stdin.on("end", () => { const release = JSON.parse(input); if (!Number.isSafeInteger(release.id)) throw new Error("Некорректный ID релиза"); console.log(release.id) })')
|
||||
echo "id=${RELEASE_ID}" >> "$GITHUB_OUTPUT"
|
||||
printf '%s' "${RELEASE_ID}" > /tmp/release-id.txt
|
||||
|
||||
- name: Upload Linux and Windows release files
|
||||
env:
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
RELEASE_ID: ${{ steps.release.outputs.id }}
|
||||
VERSION: ${{ steps.version.outputs.version }}
|
||||
run: |
|
||||
RELEASE_ID=$(printf '%s' "${RELEASE_ID}" | tr -cd '0-9')
|
||||
RELEASE_ID=$(tr -cd '0-9' < /tmp/release-id.txt)
|
||||
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" \
|
||||
|
|
|
|||
Loading…
Reference in a new issue