fix(release): read published release assets by id

gh release view --json assets stays empty after a draft is published, so the
desktop and Android audits treat a complete release as missing and Android
returns it to Draft. Read asset names from the release API URL instead.
This commit is contained in:
tianma-if committed 2026-09-23 17:41:42 +08:00
1 parent d176514325
commit 201f2c1887
5 files changed
+19 -10

No files matched your search

+4 -4
View File
@@ -78,11 +78,11 @@ jobs:
test "$expected_version" = "$root_version"
fi
# `gh release view --json assets` stays empty after a draft is published.
# The API URL is addressed by release id and still lists the uploads.
release_api="$(gh release view "$CURRENT_TAG" --repo "$GITHUB_REPOSITORY" --json apiUrl --jq .apiUrl)"
mapfile -t current_assets < <(
gh release view "$CURRENT_TAG" \
--repo "$GITHUB_REPOSITORY" \
--json assets \
--jq '.assets[].name'
gh api "$release_api" --jq '.assets[].name'
)
asset_ready="$(
printf '%s\n' "${current_assets[@]}" |
+4 -4
View File
@@ -116,11 +116,11 @@ jobs:
fi
fi
# `gh release view --json assets` stays empty after a draft is published.
# The API URL is addressed by release id and still lists the uploads.
release_api="$(gh release view "$CURRENT_TAG" --repo "$GITHUB_REPOSITORY" --json apiUrl --jq .apiUrl)"
mapfile -t current_assets < <(
gh release view "$CURRENT_TAG" \
--repo "$GITHUB_REPOSITORY" \
--json assets \
--jq '.assets[].name'
gh api "$release_api" --jq '.assets[].name'
)
asset_ready="$(
printf '%s\n' "${current_assets[@]}" |